/freebsd-10-stable/contrib/netbsd-tests/lib/libc/c063/ |
H A D | t_o_search.c | 70 int dfd; local 77 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 79 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); 82 ATF_REQUIRE(fchmod(dfd, 644) == 0); 84 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1); 87 ATF_REQUIRE(close(dfd) == 0); 100 int dfd; local 107 ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1); 109 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1); 112 ATF_REQUIRE(fchmod(dfd, 64 132 int dfd; local 166 int dfd; local 194 int dfd; local 224 int dfd; local 256 int dfd; local [all...] |
H A D | t_faccessat.c | 59 int dfd; local 66 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 67 ATF_REQUIRE(faccessat(dfd, BASEFILE, F_OK, 0) == 0); 68 ATF_REQUIRE(close(dfd) == 0); 108 int dfd; local 111 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 112 ATF_REQUIRE(faccessat(dfd, FILEERR, F_OK, 0) == -1); 113 ATF_REQUIRE(close(dfd) == 0); 123 int dfd; local 131 ATF_REQUIRE((dfd 159 int dfd; local [all...] |
H A D | t_fstatat.c | 59 int dfd; local 67 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 68 ATF_REQUIRE(fstatat(dfd, BASEFILE, &st1, 0) == 0); 69 ATF_REQUIRE(close(dfd) == 0); 115 int dfd; local 119 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 120 ATF_REQUIRE(fstatat(dfd, FILEERR, &st, 0) == -1); 121 ATF_REQUIRE(close(dfd) == 0); 131 int dfd; local 140 ATF_REQUIRE((dfd 169 int dfd; local [all...] |
H A D | t_unlinkat.c | 57 int dfd; local 64 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 65 ATF_REQUIRE(unlinkat(dfd, BASEFILE, 0) == 0); 66 ATF_REQUIRE(close(dfd) == 0); 106 int dfd; local 109 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 110 ATF_REQUIRE(unlinkat(dfd, FILEERR, 0) == -1); 111 ATF_REQUIRE(close(dfd) == 0); 121 int dfd; local 129 ATF_REQUIRE((dfd [all...] |
H A D | t_openat.c | 57 int dfd; local 64 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 65 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDONLY, 0)) != -1); 66 ATF_REQUIRE(close(dfd) == 0); 110 int dfd; local 114 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 115 ATF_REQUIRE((fd = openat(dfd, FILEERR, O_RDONLY, 0)) == -1); 116 ATF_REQUIRE(close(dfd) == 0); 126 int dfd; local 134 ATF_REQUIRE((dfd [all...] |
H A D | t_fchmodat.c | 59 int dfd; local 67 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 68 ATF_REQUIRE(fchmodat(dfd, BASEFILE, 0600, 0) == 0); 69 ATF_REQUIRE(close(dfd) == 0); 116 int dfd; local 119 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 120 ATF_REQUIRE(fchmodat(dfd, FILEERR, 0600, 0) == -1); 121 ATF_REQUIRE(close(dfd) == 0); 131 int dfd; local 139 ATF_REQUIRE((dfd [all...] |
H A D | t_utimensat.c | 65 int dfd; local 73 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 74 ATF_REQUIRE(utimensat(dfd, BASEFILE, tptr, 0) == 0); 75 ATF_REQUIRE(close(dfd) == 0); 128 int dfd; local 131 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 132 ATF_REQUIRE(utimensat(dfd, FILEERR, tptr, 0) == -1); 133 ATF_REQUIRE(close(dfd) == 0); 143 int dfd; local 151 ATF_REQUIRE((dfd 179 int dfd; local [all...] |
H A D | t_fchownat.c | 77 int dfd; local 88 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 89 ATF_REQUIRE(fchownat(dfd, BASEFILE, uid, gid, 0) == 0); 90 ATF_REQUIRE(close(dfd) == 0); 149 int dfd; local 155 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 156 ATF_REQUIRE(fchownat(dfd, FILEERR, uid, gid, 0) == -1); 157 ATF_REQUIRE(close(dfd) == 0); 168 int dfd; local 179 ATF_REQUIRE((dfd 212 int dfd; local [all...] |
H A D | t_readlinkat.c | 59 int dfd; local 69 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 70 len = readlinkat(dfd, BASELINK, buf, sizeof(buf)-1); 73 ATF_REQUIRE(close(dfd) == 0); 122 int dfd; local 125 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 126 ATF_REQUIRE(readlinkat(dfd, FILEERR, F_OK, 0) == -1); 127 ATF_REQUIRE(close(dfd) == 0);
|
H A D | t_mkdirat.c | 57 int dfd; local 61 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 62 ATF_REQUIRE(mkdirat(dfd, BASESDIR, mode) != -1); 63 ATF_REQUIRE(close(dfd) == 0);
|
H A D | t_mkfifoat.c | 57 int dfd; local 61 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 62 ATF_REQUIRE(mkfifoat(dfd, BASEFIFO, mode) != -1); 64 (void)close(dfd);
|
H A D | t_symlinkat.c | 61 int dfd, fd; local 69 ATF_REQUIRE((dfd = open(NDIR, O_RDONLY, 0)) != -1); 70 ATF_REQUIRE(symlinkat(RELFILE, dfd, BASELINK) == 0); 71 ATF_REQUIRE(close(dfd) == 0);
|
H A D | t_mknodat.c | 72 int dfd; local 79 ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1); 80 ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); 83 (void)close(dfd);
|
/freebsd-10-stable/contrib/tcsh/ |
H A D | tw.init.c | 75 DIR *dfd; /* Current directory descriptor */ member in struct:__anon407 79 #define SETDIR(dfd) \ 81 tw_dir_fd = dfd; \ 86 #define CLRDIR(dfd) \ 87 if (dfd != NULL) { \ 89 xclosedir(dfd); \ 90 dfd = NULL; \ 161 tw_dir_next(struct Strbuf *res, DIR *dfd) argument 165 if (dfd == NULL) 168 if ((dirp = readdir(dfd)) ! 347 tw_cmd_start(DIR *dfd, const Char *pat) argument 539 tw_var_start(DIR *dfd, const Char *pat) argument 553 tw_alias_start(DIR *dfd, const Char *pat) argument 567 tw_complete_start(DIR *dfd, const Char *pat) argument 597 tw_logname_start(DIR *dfd, const Char *pat) argument 663 tw_grpname_start(DIR *dfd, const Char *pat) argument 732 tw_file_start(DIR *dfd, const Char *pat) argument 836 tw_vl_start(DIR *dfd, const Char *pat) argument 852 tw_wl_start(DIR *dfd, const Char *pat) argument 891 tw_bind_start(DIR *dfd, const Char *pat) argument 925 tw_limit_start(DIR *dfd, const Char *pat) argument 963 tw_sig_start(DIR *dfd, const Char *pat) argument 1000 tw_job_start(DIR *dfd, const Char *pat) argument [all...] |
/freebsd-10-stable/contrib/netbsd-tests/fs/puffs/h_dtfs/ |
H A D | dtfs_subr.c | 85 struct dtfs_dirent *dfd; local 110 dfd = emalloc(sizeof(struct dtfs_dirent)); 111 dfd->dfd_node = newpn; 112 dfd->dfd_name = estrndup(pcn->pcn_name, pcn->pcn_namelen); 113 dfd->dfd_namelen = strlen(dfd->dfd_name); 114 dfd->dfd_parent = dir; 115 dtfs_adddent(dir, dfd); 182 struct dtfs_dirent *dfd; local 187 dfd [all...] |
H A D | dtfs_vnops.c | 48 struct dtfs_dirent *dfd; local 64 dfd = dtfs_dirgetbyname(df, pcn->pcn_name, pcn->pcn_namelen); 65 if (dfd) { 74 puffs_newinfo_setcookie(pni, dfd->dfd_node); 75 puffs_newinfo_setvtype(pni, dfd->dfd_node->pn_va.va_type); 76 puffs_newinfo_setsize(pni, dfd->dfd_node->pn_va.va_size); 77 puffs_newinfo_setrdev(pni, dfd->dfd_node->pn_va.va_rdev); 80 puffs_flush_pagecache_node(pu, dfd->dfd_node); 376 struct dtfs_dirent *dfd; local 378 dfd [all...] |
/freebsd-10-stable/contrib/openbsm/bin/auditdistd/ |
H A D | trail.c | 158 int dfd; local 162 dfd = dirfd(dirfp); 163 PJDLOG_ASSERT(dfd >= 0); 164 if (fstatat(dfd, filename, &sb, AT_SYMLINK_NOFOLLOW) == -1) { 207 int dfd, fd; local 221 dfd = dirfd(trail->tr_dirfp); 222 PJDLOG_ASSERT(dfd >= 0); 224 fd = openat(dfd, trail->tr_filename, O_RDONLY); 307 if (unlinkat(dfd, trail->tr_filename, 0) == -1) { 322 int dfd; local 414 int dfd; local [all...] |
/freebsd-10-stable/contrib/netbsd-tests/fs/kernfs/ |
H A D | t_basic.c | 48 int dfd; local 52 if ((dfd = rump_sys_open("/kern", O_RDONLY)) == -1) 54 if (rump_sys_getdents(dfd, buf, sizeof(buf)) == -1)
|
/freebsd-10-stable/sbin/gbde/ |
H A D | gbde.c | 331 cmd_open(struct g_bde_softc *sc, int dfd , const char *l_opt, u_int *nkey) 340 error = ioctl(dfd, DIOCGSECTORSIZE, §orsize); 343 error = ioctl(dfd, DIOCGMEDIASIZE, &mediasize); 345 error = fstat(dfd, &st); 379 cmd_nuke(struct g_bde_key *gl, int dfd , int key) 388 offset2 = lseek(dfd, offset, SEEK_SET); 391 i = write(dfd, sbuf, gl->sectorsize); 399 cmd_write(struct g_bde_key *gl, struct g_bde_softc *sc, int dfd , int key, const char *l_opt) 435 offset2 = lseek(dfd, 0, SEEK_SET); 438 i = read(dfd, sbu 518 cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char *l_opt) argument 743 int i_opt, n_opt, ch, dfd, doopen; local [all...] |
/freebsd-10-stable/libexec/rbootd/ |
H A D | parseconf.c | 312 DIR *dfd; local 328 if ((dfd = opendir(".")) == NULL) { /* open BootDir */ 340 for (dp = readdir(dfd); dp != NULL; dp = readdir(dfd)) { 352 (void) closedir(dfd); /* close BootDir */
|
/freebsd-10-stable/sys/compat/linux/ |
H A D | linux_file.c | 178 int dfd; local 180 dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; 182 LCONVPATH_AT(td, args->filename, &path, 1, dfd); 184 LCONVPATH_AT(td, args->filename, &path, 0, dfd); 187 printf(ARGS(openat, "%i, %s, 0x%x, 0x%x"), args->dfd, 190 return (linux_common_open(td, dfd, path, args->flags, args->mode)); 577 int error, dfd; local 583 dfd 625 int error, dfd; local 690 int error, dfd; local 726 int error, dfd; local 835 int error, dfd; local 880 int error, dfd; local 1473 int error, dfd, flag; local [all...] |
H A D | linux_util.h | 56 #define LCONVPATH_AT(td, upath, pathp, i, dfd) \ 61 pathp, i, dfd); \ 70 #define LCONVPATHEXIST_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 0, dfd) 72 #define LCONVPATHCREAT_AT(td, upath, pathp, dfd) LCONVPATH_AT(td, upath, pathp, 1, dfd)
|
H A D | linux_stats.c | 643 int error, dfd, flag; local 651 dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; 652 LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); 656 printf(ARGS(fstatat64, "%i, %s, %i"), args->dfd, path, args->flag); 659 error = linux_kern_statat(td, flag, dfd, path, UIO_SYSSPACE, &buf); 673 int error, dfd, flag; local 681 dfd = (args->dfd [all...] |
/freebsd-10-stable/usr.bin/rwho/ |
H A D | rwho.c | 99 int dfd; local 126 dfd = dirfd(dirp); 129 if (cap_rights_limit(dfd, &rights) < 0 && errno != ENOSYS) 144 f = openat(dfd, dp->d_name, O_RDONLY);
|
/freebsd-10-stable/contrib/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) 761 int dfd; local 769 dfd = sm_io_getinfo(df, SM_IO_WHAT_FD, NULL); 770 if (dfd >= 0) 771 dumpfd(dfd, true, true);
|