Home
last modified time | relevance | path

Searched refs:dirfd (Results 1 – 25 of 41) sorted by relevance

12

/external/libchrome/sandbox/linux/suid/
Dprocess_util_linux.c41 const int dirfd = open(oom_adj, O_RDONLY | O_DIRECTORY); in AdjustOOMScore() local
42 if (dirfd < 0) in AdjustOOMScore()
46 if (fstat(dirfd, &statbuf) < 0) { in AdjustOOMScore()
47 close(dirfd); in AdjustOOMScore()
51 close(dirfd); in AdjustOOMScore()
55 int fd = openat(dirfd, "oom_score_adj", O_WRONLY); in AdjustOOMScore()
59 fd = openat(dirfd, "oom_adj", O_WRONLY); in AdjustOOMScore()
70 close(dirfd); in AdjustOOMScore()
/external/valgrind/memcheck/tests/darwin/
Dpth-undocumented.c21 int __pthread_fchdir(int dirfd) in __pthread_fchdir() argument
23 return syscall(SYS___pthread_fchdir, dirfd); in __pthread_fchdir()
28 int dirfd; in main() local
30 dirfd = open("/", O_RDONLY); in main()
31 if (dirfd == -1) in main()
37 if (__pthread_fchdir(dirfd)) in main()
/external/toybox/toys/other/
Dlspci.c44 int dirfd; local
50 if (-1 == (dirfd = openat(dirtree_parentfd(new), new->name, O_RDONLY)))
56 if (readlinkat(dirfd, "driver", driver, sizeof(driver))) {};
62 if (-1 == (fd = openat(dirfd, *fields, O_RDONLY))) {
63 close(dirfd);
73 close(dirfd);
Dacpi.c32 int read_int_at(int dirfd, char *name)
37 if ((fd = openat(dirfd, name, O_RDONLY)) < 0) return -1;
/external/toybox/lib/
Ddirtree.c35 int fd = parent ? parent->dirfd : AT_FDCWD; in dirtree_add_node()
96 return node->parent ? node->parent->dirfd : AT_FDCWD; in dirtree_parentfd()
118 new->dirfd = openat(dirtree_parentfd(new), new->name, O_CLOEXEC); in dirtree_handle_callback()
142 if (node->dirfd == -1 || !(dir = fdopendir(node->dirfd))) { in dirtree_recurse()
148 close(node->dirfd); in dirtree_recurse()
174 node->dirfd = -1; in dirtree_recurse()
Dportability.h123 int fstatat64(int dirfd, const char *pathname, void *buf, int flags);
124 int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
127 int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags);
128 int openat(int dirfd, const char *pathname, int flags, ...);
132 int fchownat(int dirfd, const char *pathname,
135 int unlinkat(int dirfd, const char *pathname, int flags);
Dxwrap.c400 int try = 9999, dirfd = open("/", 0);; in xabspath() local
432 } else len=readlinkat(dirfd, new->str, buf, 4096); in xabspath()
448 fd = openat(dirfd, s, 0); in xabspath()
450 close(dirfd); in xabspath()
451 dirfd = fd; in xabspath()
460 close(dirfd); in xabspath()
461 dirfd = open("/", 0); in xabspath()
474 close(dirfd); in xabspath()
503 close(dirfd); in xabspath()
Dlib.h75 int dirfd; member
168 char *readfileat(int dirfd, char *name, char *buf, off_t *len);
Dlib.c448 char *readfileat(int dirfd, char *name, char *ibuf, off_t *plen) in readfileat() argument
457 if (-1 == (fd = openat(dirfd, name, O_RDONLY))) return 0; in readfileat()
/external/strace/tests/
Dfile_handle.c45 const int dirfd = AT_FDCWD; in main() local
52 if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) != -1 in main()
61 if (name_to_handle_at(dirfd, ".", handle, &mount_id, flags) != -1 in main()
71 assert(!name_to_handle_at(dirfd, ".", handle, &mount_id, flags)); in main()
/external/toybox/toys/posix/
Dls.c286 static void listfiles(int dirfd, struct dirtree *indir) in listfiles() argument
294 if (-1 == dirfd) { in listfiles()
322 indir->dirfd = dup(dirfd); in listfiles()
485 if (fstatat(dirfd, sort[next]->symlink, &st2, 0)) color = 256+31; in listfiles()
513 listfiles(openat(dirfd, sort[ul]->name, 0), sort[ul]); in listfiles()
517 if (dirfd != AT_FDCWD) close(dirfd); in listfiles()
544 TT.files->dirfd = AT_FDCWD; in ls_main()
Dfind.c97 rc = fchdir(new->parent->dirfd); in flush_exec()
/external/webrtc/webrtc/base/
Dlinuxfdwalk.c43 int opendirfd = dirfd(dir); in fdwalk()
/external/openssh/openbsd-compat/
Dbsd-closefrom.c84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp)) in closefrom()
Dgetcwd.c148 if (!(dir = opendir(up)) || fstat(dirfd(dir), &s)) in getcwd()
/external/tcpdump/
Dtcpdump.c475 int dirfd; member
1903 dumpinfo.dirfd = open(dirname(WFileName), in main()
1905 if (dumpinfo.dirfd < 0) { in main()
1911 if (cap_rights_limit(dumpinfo.dirfd, &rights) < 0 && in main()
1915 if (cap_fcntls_limit(dumpinfo.dirfd, CAP_FCNTL_GETFL) < 0 && in main()
2310 fd = openat(dump_info->dirfd, in dump_packet_and_trunc()
2382 fd = openat(dump_info->dirfd, dump_info->CurrentFileName, in dump_packet_and_trunc()
/external/e2fsprogs/contrib/
Dspd_readdir.c451 int dirfd(DIR *dir) in dirfd() function
/external/libdaemon/libdaemon/
Ddfork.c532 if (fd == dirfd(d)) in daemon_close_allv()
/external/dbus/dbus/
Ddbus-message-util.c182 if (fd == dirfd (d)) in _dbus_check_fdleaks_enter()
227 if (fd == dirfd (d)) in _dbus_check_fdleaks_leave()
/external/rmi4utils/rmidevice/
Dhiddevice.cpp658 sz = readlinkat(dirfd(devicesDir), devicesDirEntry->d_name, buf, PATH_MAX); in FindTransportDevice()
/external/lldb/source/Host/common/
DFileSpec.cpp913 long path_max = fpathconf (dirfd (dir_path_dir.get()), _PC_NAME_MAX); in EnumerateDirectory()
/external/ltrace/etc/
Dlibc.so.conf71 int dirfd(DIR *);
/external/compiler-rt/lib/msan/tests/
Dmsan_test.cc719 int dirfd = open(DIR_TO_READ, O_RDONLY); in TEST() local
720 ASSERT_GT(dirfd, 0); in TEST()
721 int res = fstatat(dirfd, SUBFILE_TO_READ, st, 0); in TEST()
726 close(dirfd); in TEST()
/external/dbus/
Dconfigure.ac634 AC_MSG_CHECKING(for dirfd)
641 dirfd(dirp);
648 AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
/external/bison/
Dmaint.mk682 _de1 = dirfd|(close|(fd)?open|read|rewind|seek|tell)dir(64)?(_r)?

12