Lines Matching refs:devfd
214 int devfd = -1; in ukfs_part_probe() local
257 devfd = open(devpath, O_RDONLY); in ukfs_part_probe()
258 if (devfd == -1) { in ukfs_part_probe()
264 if (pread(devfd, buf, sizeof(buf), 0) == -1) { in ukfs_part_probe()
357 if (devfd != -1) in ukfs_part_probe()
358 close(devfd); in ukfs_part_probe()
447 int rv = 0, devfd; in process_diskdevice() local
452 devfd = open(devpath, rdonly ? O_RDONLY : O_RDWR); in process_diskdevice()
453 if (devfd == -1) { in process_diskdevice()
458 if (fstat(devfd, &sb) == -1) { in process_diskdevice()
476 if (fcntl(devfd, F_SETLK, &flarg) == -1) { in process_diskdevice()
481 if (fcntl(devfd, F_GETLK, &flarg) != 1) in process_diskdevice()
491 close(devfd); in process_diskdevice()
492 devfd = -1; in process_diskdevice()
494 *dfdp = devfd; in process_diskdevice()
498 if (devfd != -1) in process_diskdevice()
499 close(devfd); in process_diskdevice()
535 int rv = 0, devfd = -1; in doukfsmount() local
544 mntflags & MNT_RDONLY, &devfd)) != 0) in doukfsmount()
628 fs->ukfs_devfd = devfd; in doukfsmount()
648 if (devfd != -1) { in doukfsmount()
649 unlockdev(devfd, part); in doukfsmount()
650 close(devfd); in doukfsmount()