Searched refs:dirfd (Results 1 - 25 of 28) sorted by relevance

12

/openbsd-current/lib/libc/gen/
H A Ddirfd.c10 dirfd(DIR *dirp) function
14 DEF_WEAK(dirfd); variable
H A Dscandir.c156 scandirat(int dirfd, const char *dirname, struct dirent ***namelist, argument
163 fd = HIDDEN(openat)(dirfd, dirname, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
H A Ddevname.c57 if (fstatat(dirfd(dirp), dp->d_name, &sb, AT_SYMLINK_NOFOLLOW)
H A Dttyname.c126 if (fstatat(dirfd(dp), dirp->d_name, &dsb, AT_SYMLINK_NOFOLLOW)
H A DMakefile.inc9 daemon.c devname.c dirfd.c dirname.c disklabel.c err.c \
H A Dfts.c611 if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
723 p->fts_info = fts_stat(sp, p, 0, dirfd(dirp));
/openbsd-current/lib/libc/hidden/
H A Ddirent.h29 PROTO_NORMAL(dirfd); variable
/openbsd-current/sys/arch/octeon/stand/rdboot/
H A Dcmd.c368 int dirfd, oldcwd; local
384 dirfd = open(path, O_RDONLY);
385 if (dirfd < 0) {
390 if ((dir = fdopendir(dirfd)) < 0) {
392 close(dirfd);
396 fchdir(dirfd);
398 if (fstatat(dirfd, dent->d_name, &sb,
/openbsd-current/sys/arch/powerpc64/stand/rdboot/
H A Dcmd.c368 int dirfd, oldcwd; local
384 dirfd = open(path, O_RDONLY);
385 if (dirfd < 0) {
390 if ((dir = fdopendir(dirfd)) < 0) {
392 close(dirfd);
396 fchdir(dirfd);
398 if (fstatat(dirfd, dent->d_name, &sb,
/openbsd-current/sys/sys/
H A Dnamei.h52 int ni_dirfd; /* dirfd from *at() functions */
157 enum uio_seg segflg, int dirfd, const char *namep, struct proc *p);
159 #define NDINITAT(ndp, op, flags, segflg, dirfd, namep, p) \
160 ndinitat(ndp, op, flags, segflg, dirfd, namep, p)
/openbsd-current/include/
H A Ddirent.h103 int dirfd(DIR *);
/openbsd-current/gnu/usr.bin/perl/t/op/
H A Dchdir.t67 like($@, qr/^The dirfd function is unimplemented at/, "dirfd is unimplemented");
82 like($@, qr/^The dirfd function is unimplemented at/, "dirfd is unimplemented");
H A Dstat.t577 skip "No dirfd()", 4 unless $Config{d_dirfd} || $Config{d_dir_dd_fd};
597 skip "No dirfd()", 4 unless $Config{d_dirfd} || $Config{d_dir_dd_fd};
/openbsd-current/usr.bin/vi/common/
H A Drecover.c544 if ((fd = rcv_openat(sp, dirfd(dirp), dp->d_name, NULL)) == -1)
575 (void)unlinkat(dirfd(dirp), dp->d_name, 0);
631 if ((fd = rcv_openat(sp, dirfd(dirp), dp->d_name, &lck)) == -1)
/openbsd-current/usr.sbin/cron/
H A Ddatabase.c128 process_crontab(dirfd(dir), dp->d_name, dp->d_name,
/openbsd-current/sys/kern/
H A Dvfs_lookup.c84 enum uio_seg segflg, int dirfd, const char *namep, struct proc *p)
90 ndp->ni_dirfd = dirfd;
83 ndinitat(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg, int dirfd, const char *namep, struct proc *p) argument
/openbsd-current/usr.sbin/lpr/common_source/
H A Dcommon.c240 if (fstat(dirfd(dirp), &stbuf) < 0)
/openbsd-current/usr.bin/rdist/
H A Dexpand.c357 if (fstat(dirfd(dirp), &stb) == -1)
/openbsd-current/regress/sys/kern/unveil/
H A Dsyscalls.c99 int dirfd; local
104 UV_SHOULD_SUCCEED(((dirfd = open("/", O_RDONLY | O_DIRECTORY)) == -1), "open");
/openbsd-current/usr.bin/mg/
H A Dfileio.c533 if (fstatat(dirfd(dirp), dent->d_name, &statbuf, 0) < 0)
/openbsd-current/usr.sbin/lpd/
H A Dlp.c298 if (fstat(dirfd(dp), &st) == -1) {
/openbsd-current/usr.sbin/ypbind/
H A Dypbind.c367 (void)unlinkat(dirfd(dirp), dent->d_name, 0);
/openbsd-current/gnu/llvm/compiler-rt/lib/msan/tests/
H A Dmsan_test.cpp734 int dirfd = open(DIR_TO_READ, O_RDONLY); local
735 ASSERT_GT(dirfd, 0);
736 int res = fstatat(dirfd, SUBFILE_TO_READ, st, 0);
741 close(dirfd);
/openbsd-current/gnu/llvm/compiler-rt/lib/tsan/rtl/
H A Dtsan_interceptors_posix.cpp44 #define dirfd(dirp) (*(int *)(dirp)) macro
100 extern "C" int dirfd(void *dirp);
1950 int fd = dirfd(dirp);
/openbsd-current/gnu/llvm/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_common_interceptors.inc6273 INTERCEPTOR(int, flopenat, int dirfd, const char *path, int flags, ...) {
6283 return REAL(flopenat)(dirfd, path, flags, mode);
7477 INTERCEPTOR(SSIZE_T, readlinkat, int dirfd, const char *path, char *buf,
7480 COMMON_INTERCEPTOR_ENTER(ctx, readlinkat, dirfd, path, buf, bufsiz);
7482 SSIZE_T res = REAL(readlinkat)(dirfd, path, buf, bufsiz);
7494 INTERCEPTOR(int, name_to_handle_at, int dirfd, const char *pathname,
7497 COMMON_INTERCEPTOR_ENTER(ctx, name_to_handle_at, dirfd, pathname, handle,
7507 int res = REAL(name_to_handle_at)(dirfd, pathname, handle, mount_id, flags);

Completed in 271 milliseconds

12