/illumos-gate/usr/src/cmd/varpd/ |
H A D | varpd.c | 120 varpd_dfatal(int dfd, const char *fmt, ...) in varpd_dfatal() argument 130 (void) write(dfd, &status, sizeof (status)); in varpd_dfatal() 343 varpd_load_smf(int dfd) in varpd_load_smf() argument 358 varpd_dfatal(dfd, "failed to load from %s: %s\n", in varpd_load_smf() 382 int err, c, dirfd, dfd, i; in main() local 436 dfd = varpd_daemonize(dirfd); in main() 447 varpd_dfatal(dfd, "failed to load from %s: %s\n", in main() 452 varpd_load_smf(dfd); in main() 455 varpd_dfatal(dfd, "failed to enable varpd persistence: %s\n", in main() 459 varpd_dfatal(dfd, "failed to enable varpd persistence: %s\n", in main() [all …]
|
/illumos-gate/usr/src/cmd/backup/restore/ |
H A D | utilities.c | 148 int dfd; in newnode() local 152 resolve(myname(np), &dfd, &cp); in newnode() 153 if (dfd != AT_FDCWD) { in newnode() 154 if (fchdir(dfd) < 0) { in newnode() 160 (void) close(dfd); in newnode() 174 if (dfd != AT_FDCWD) { in newnode() 176 (void) close(dfd); in newnode() 188 int dfd; in removenode() local 198 resolve(myname(ep), &dfd, &cp); in removenode() 199 if (dfd != AT_FDCWD) { in removenode() [all …]
|
H A D | restore.c | 812 int dfd; in createlinks() local 825 resolve(myname(np), &dfd, &from); in createlinks() 826 if (dfd != AT_FDCWD) { in createlinks() 827 if (fchdir(dfd) < 0) { in createlinks() 833 (void) close(dfd); in createlinks() 844 if (dfd != AT_FDCWD) { in createlinks() 846 (void) close(dfd); in createlinks()
|
H A D | dirs.c | 643 int dfd; in setdirmodes() local 698 resolve(myname(ep), &dfd, &cp); in setdirmodes() 699 if (dfd != AT_FDCWD) { in setdirmodes() 700 if (fchdir(dfd) < 0) { in setdirmodes() 705 (void) close(dfd); in setdirmodes() 744 if (dfd != AT_FDCWD) { in setdirmodes() 746 (void) close(dfd); in setdirmodes()
|
H A D | tape.c | 755 int dfd; in extractfile() local 769 resolve(name, &dfd, &rname); in extractfile() 770 if (dfd != AT_FDCWD) { in extractfile() 771 if (fchdir(dfd) < 0) { in extractfile() 777 (void) close(dfd); in extractfile() 1004 if (dfd != AT_FDCWD) { in extractfile() 1006 (void) close(dfd); in extractfile()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ |
H A D | syncloop.c | 61 static int cfd, dfd; /* control and data descriptors */ variable 167 dfd = open(dnambuf, O_RDWR); in main() 168 if (dfd < 0) { in main() 330 pfd.fd = dfd; in quiet_period() 334 (void) read(dfd, bigbuf, sizeof (bigbuf)); in quiet_period() 364 if (write(dfd, packet, reclen) != reclen) { in first_packet() 370 pfd.fd = dfd; in first_packet() 377 len = read(dfd, bigbuf, reclen); in first_packet() 441 pfd.fd = dfd; in many_packets() 447 (void) lseek(dfd, (long)0, 0); in many_packets() [all …]
|
/illumos-gate/usr/src/lib/libc/port/sys/ |
H A D | open.c | 41 __openat(int dfd, const char *path, int oflag, mode_t mode) in __openat() argument 43 return (syscall(SYS_openat, dfd, path, oflag, mode)); in __openat() 59 __openat64(int dfd, const char *path, int oflag, mode_t mode) in __openat64() argument 61 return (syscall(SYS_openat64, dfd, path, oflag, mode)); in __openat64()
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | readlink.c | 54 readlinkat(int dfd, char *name, char *buf, size_t count) in readlinkat() argument 69 if ((error = fgetstartvp(dfd, name, &startvp)) != 0) in readlinkat() 131 readlinkat32(int dfd, caddr32_t name, caddr32_t buf, size32_t count) in readlinkat32() argument 133 return ((ssize32_t)readlinkat(dfd, (char *)(uintptr_t)name, in readlinkat32()
|
H A D | symlink.c | 56 symlinkat(char *target, int dfd, char *linkname) in symlinkat() argument 70 if ((error = fgetstartvp(dfd, linkname, &startvp)) != 0) in symlinkat()
|
/illumos-gate/usr/src/test/libc-tests/tests/ |
H A D | utimes.c | 144 int fd, lfd, dfd, ret = true; in runtest() local 166 if ((dfd = open(dir, O_DIRECTORY|O_RDONLY)) == -1) in runtest() 292 if (futimesat(dfd, "file", tv) == -1) in runtest() 303 if (futimesat(dfd, "link", tv) == -1) in runtest() 314 if (fchdir(dfd) == -1) in runtest() 388 if (utimensat(dfd, "file", ts, 0) == -1) in runtest() 399 if (utimensat(dfd, "link", ts, 0) == -1) in runtest() 410 if (fchdir(dfd) == -1) in runtest() 457 (void) close(dfd); in runtest()
|
/illumos-gate/usr/src/lib/smbsrv/libfksmbsrv/common/ |
H A D | fake_vop.c | 410 int dfd = vncache_getfd(dvp); in fake_lookup_xattrdir() local 440 fd = openat(dfd, ".", omode); in fake_lookup_xattrdir() 495 int dfd = vncache_getfd(dvp); in fop_lookup() local 509 if (fstatat(dfd, name, &st, AT_SYMLINK_NOFOLLOW) == -1) in fop_lookup() 524 fd = openat(dfd, name, omode, 0); in fop_lookup() 527 DTRACE_PROBE3(openat, int, dfd, char *, name, int, err); in fop_lookup() 565 int dfd = vncache_getfd(dvp); in fop_create() local 576 err = fstatat(dfd, name, &st, AT_SYMLINK_NOFOLLOW); in fop_create() 599 fd = openat(dfd, name, omode, mode); in fop_create() 602 DTRACE_PROBE3(openat, int, dfd, char *, name, int, err); in fop_create() [all …]
|
/illumos-gate/usr/src/cmd/fs.d/nfs/nfsmapid/ |
H A D | nfsmapid.c | 258 int dfd; in start_svcs() local 271 if ((dfd = open(NFSMAPID_DOOR, O_RDWR|O_CREAT|O_TRUNC, in start_svcs() 288 (void) close(dfd); in start_svcs() 292 (void) close(dfd); in start_svcs()
|
/illumos-gate/usr/src/cmd/fs.d/reparsed/ |
H A D | reparsed.c | 320 int dfd; in start_reparsed_svcs() local 331 if ((dfd = open(REPARSED_DOOR, O_RDWR|O_CREAT|O_TRUNC, in start_reparsed_svcs() 349 (void) close(dfd); in start_reparsed_svcs() 352 (void) close(dfd); in start_reparsed_svcs()
|
/illumos-gate/usr/src/lib/libc/i386/sys/ |
H A D | ptrace.c | 436 Dupfd(int fd, int dfd) in Dupfd() argument 442 if (dfd > 2 || (0 <= fd && fd <= 2)) { in Dupfd() 443 if (dfd > 2 && fd != dfd) in Dupfd() 444 (void) close(dfd); in Dupfd() 446 dfd = 3; in Dupfd() 447 if (fd != dfd) { in Dupfd() 448 dfd = fcntl(fd, F_DUPFD, (intptr_t)dfd); in Dupfd() 450 fd = dfd; in Dupfd()
|
/illumos-gate/usr/src/lib/libc/sparc/sys/ |
H A D | ptrace.c | 446 Dupfd(int fd, int dfd) in Dupfd() argument 452 if (dfd > 2 || (0 <= fd && fd <= 2)) { in Dupfd() 453 if (dfd > 2 && fd != dfd) in Dupfd() 454 (void) close(dfd); in Dupfd() 456 dfd = 3; in Dupfd() 457 if (fd != dfd) { in Dupfd() 458 dfd = fcntl(fd, F_DUPFD, (intptr_t)dfd); in Dupfd() 460 fd = dfd; in Dupfd()
|
/illumos-gate/usr/src/cmd/sendmail/src/ |
H A D | collect.c | 198 int dfd; local 221 dfd = sm_io_getinfo(df, SM_IO_WHAT_FD, NULL); 222 if (dfd < 0 || fstat(dfd, &stbuf) < 0) 750 int dfd; local 758 dfd = sm_io_getinfo(df, SM_IO_WHAT_FD, NULL); 759 if (dfd >= 0) 760 dumpfd(dfd, true, true);
|
/illumos-gate/usr/src/cmd/idmap/idmapd/ |
H A D | idmapd.c | 77 static int dfd = -1; /* our door server fildes, for unregistration */ variable 411 dfd = xprt->xp_fd; in init_idmapd() 413 if (dfd == -1) { in init_idmapd() 417 if ((error = __idmap_reg(dfd)) != 0) { in init_idmapd() 450 (void) __idmap_unreg(dfd); in fini_idmapd()
|
/illumos-gate/usr/src/cmd/filesync/ |
H A D | recon.c | 666 { int sfd, dfd; in samecompare() local 676 dfd = open(dstname, 0); in samecompare() 677 if (dfd < 0) { in samecompare() 688 if (read(dfd, dstbuf, COPY_BSIZE) != count) { in samecompare() 707 close(dfd); in samecompare()
|
/illumos-gate/usr/src/cmd/utmpd/ |
H A D | utmpd.c | 884 int fd, dfd; in proc_to_fd() local 894 dfd = fcntl(fd, F_DUPFD, EXTRA_MARGIN); in proc_to_fd() 895 if (dfd > 0) { in proc_to_fd() 897 fd = dfd; in proc_to_fd()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | fts.c | 791 fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) in fts_stat() argument 800 if (dfd == -1) { in fts_stat() 802 dfd = AT_FDCWD; in fts_stat() 815 if (fstatat(dfd, path, sbp, 0)) { in fts_stat() 817 if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { in fts_stat() 824 } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { in fts_stat()
|
/illumos-gate/usr/src/cmd/lp/filter/postscript/postio/ |
H A D | ifdef.c | 910 int dfd; in dkhost_connect() local 936 while ( (dfd = ttyi = dkdial(line)) < 0 ) { in dkhost_connect() 958 close(dfd); in dkhost_connect()
|
/illumos-gate/usr/src/lib/libzutil/common/ |
H A D | zutil_import.c | 1190 int dfd; in zpool_find_import_impl() local 1215 if ((dfd = open64(rdsk, O_RDONLY)) < 0 || in zpool_find_import_impl() 1216 (dirp = fdopendir(dfd)) == NULL) { in zpool_find_import_impl() 1217 if (dfd >= 0) in zpool_find_import_impl() 1218 (void) close(dfd); in zpool_find_import_impl() 1242 slice->rn_dfd = dfd; in zpool_find_import_impl()
|
/illumos-gate/usr/src/cmd/fs.d/autofs/ |
H A D | autod_main.c | 916 int dfd; in start_autofs_svcs() local 929 if ((dfd = open(AUTOFS_DOOR, O_RDWR|O_CREAT|O_TRUNC, in start_autofs_svcs() 946 (void) close(dfd); in start_autofs_svcs()
|
/illumos-gate/usr/src/cmd/w/ |
H A D | w.c | 704 priv_proc_openat(int dfd, const char *path, int mode) in priv_proc_openat() argument 712 fd = openat(dfd, path, mode); in priv_proc_openat()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/ |
H A D | rcp.c | 1573 int dfd; in sink() local 1575 if ((dfd = open(np, O_RDONLY)) == -1) in sink() 1579 if (recvacl(dfd, exists, pflag) == ACL_FAIL) { in sink() 1580 (void) close(dfd); in sink() 1585 (void) close(dfd); in sink()
|