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