Lines Matching refs:fd
186 int fd, r;
194 fd = open(testfile, O_RDWR);
195 if (fd < 0)
203 r = ioctl(fd, FS_IOC_FIEMAP, fm);
204 close(fd);
242 int fd, r;
247 fd = open(testfile, O_RDWR);
248 if (fd < 0)
250 r = lseek(fd, 0, SEEK_HOLE);
251 close(fd);
284 int fd;
289 assert((fd = open(path, O_CREAT | O_WRONLY, 0600)) != -1);
296 assert(ftruncate(fd, total_size) != -1);
300 assert(lseek(fd, s->size, SEEK_CUR) != (off_t)-1);
310 assert(write(fd, buff, w) != (ssize_t)-1);
316 close(fd);
453 int fd;
459 fd = open(path, O_RDONLY | O_BINARY);
461 fd = -1;
463 archive_read_disk_entry_from_file(a, ae, fd, NULL));
464 if (fd >= 0)
465 close(fd);