Lines Matching defs:fd
94 int fd;
107 if ((fd = open(path, O_RDONLY)) < 0)
110 if (fstat64(fd, &statbuf) != 0) {
111 (void) close(fd);
116 (void) close(fd);
120 if (read(fd, &header, sizeof (header)) < sizeof (header)) {
121 (void) close(fd);
127 (void) close(fd);
135 (void) close(fd);
151 (void) close(fd);
156 (void) close(fd);
161 if (pread64(fd, ret + i, fidlen,
164 (void) close(fd);
169 (void) close(fd);
223 int fd;
233 if ((fd = open(shp->sh_mountpoint, O_RDONLY)) < 0) {
240 (void) close(fd);
258 if (ioctl(fd, SHADOW_IOC_FID2PATH, &ioc) != 0) {
360 (void) close(fd);
541 int fd;
546 if ((fd = open(localpath, O_RDONLY)) < 0)
553 if (ioctl(fd, SHADOW_IOC_GETPATH, &ioc) == 0 && ioc.si_processed) {
556 (void) close(fd);
561 (void) close(fd);
607 shadow_migrate_fd(int fd, uint64_t *size)
613 if (ioctl(fd, SHADOW_IOC_MIGRATE, &ioc) != 0)
631 int fd;
635 if ((fd = open(sep->se_path, O_RDONLY)) < 0)
638 if ((*errp = shadow_migrate_fd(fd, &size)) != 0) {
639 (void) close(fd);
643 if ((dirp = fdopendir(fd)) == NULL) {
644 (void) close(fd);
671 if (fstatat64(fd, dp->d_name, &statbuf,
711 int fd;
714 if ((fd = open64(sep->se_path, O_RDONLY)) < 0)
717 if ((*errp = shadow_migrate_fd(fd, &size)) != 0) {
718 (void) close(fd);
722 (void) close(fd);
740 int fd;
753 if ((fd = open(shp->sh_mountpoint, O_RDONLY)) < 0)
759 if (ioctl(fd, SHADOW_IOC_PROCESS, &ioc) != 0) {
760 (void) close(fd);
763 (void) close(fd);