Lines Matching defs:lockfd
1173 int lockfd = -1;
1192 if ((lockfd = open(lockfile, O_RDWR | O_CREAT, 0600)) == -1)
1196 (void) fchown(lockfd, DA_UID, DA_GID);
1198 if (lseek(lockfd, (off_t)0, SEEK_SET) == -1) {
1200 (void) close(lockfd);
1207 ret = lockf(lockfd, F_TLOCK, 0);
1210 return (lockfd);
1214 (void) close(lockfd);
1243 int lockfd = -1;
1260 if ((lockfd = _da_lock_devdb(rootdir)) == -1)
1276 if (lockfd != -1)
1277 (void) close(lockfd);
1283 if (lockfd != -1)
1284 (void) close(lockfd);
1289 if (lockfd != -1)
1290 (void) close(lockfd);
1310 if (lockfd != -1)
1311 (void) close(lockfd);
1318 if (lockfd != -1)
1319 (void) close(lockfd);
1326 if (lockfd != -1)
1327 (void) close(lockfd);
1334 return (lockfd);
1434 int rc = 0, lockfd = 0, tmpfd = 0;
1443 if ((lockfd = _da_lock_devdb(NULL)) == -1)
1446 (void) close(lockfd);
1453 (void) close(lockfd);
1465 (void) close(lockfd);
1486 (void) close(lockfd);
1502 int lockfd = -1;
1576 lockfd = da_open_devdb(dargs->rootdir, &dafp, NULL,
1579 lockfd = _da_lock_devdb(rootdir);
1580 if (lockfd == -1)
1584 (void) close(lockfd);
1593 (void) close(lockfd);
1606 (void) close(lockfd);
1641 (void) close(lockfd);
1650 (void) close(lockfd);
1676 (void) close(lockfd);
1685 (void) close(lockfd);
1728 (void) close(lockfd);