Lines Matching refs:fd
225 int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
226 if (fd == -1) {
236 fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
238 if (fd == -1) {
251 close(fd);
261 close(fd);
271 if (write(fd, buf, fileSize) == -1) {
275 close(fd);
281 fchmod(fd, S_IRUSR);
282 close(fd);
290 int fd = open(mFilename.string(), O_RDONLY, 0);
291 if (fd == -1) {
300 if (fstat(fd, &statBuf) == -1) {
302 close(fd);
310 close(fd);
315 PROT_READ, MAP_PRIVATE, fd, 0));
319 close(fd);
327 close(fd);
333 close(fd);
342 close(fd);
347 close(fd);