/external/libchrome/sandbox/linux/suid/ |
D | process_util_linux.c | 41 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/ |
D | pth-undocumented.c | 21 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/lib/ |
D | dirtree.c | 36 int fd = parent ? parent->dirfd : AT_FDCWD; in dirtree_add_node() 97 return node->parent ? node->parent->dirfd : AT_FDCWD; in dirtree_parentfd() 131 int (*callback)(struct dirtree *node), int dirfd, int flags) in dirtree_recurse() argument 137 node->dirfd = dirfd; in dirtree_recurse() 138 if (node->dirfd == -1 || !(dir = fdopendir(node->dirfd))) { in dirtree_recurse() 144 close(node->dirfd); in dirtree_recurse() 171 node->dirfd = -1; in dirtree_recurse()
|
D | portability.h | 96 int fstatat64(int dirfd, const char *pathname, void *buf, int flags); 97 int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); 100 int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags); 101 int openat(int dirfd, const char *pathname, int flags, ...); 105 int fchownat(int dirfd, const char *pathname, 108 int unlinkat(int dirfd, const char *pathname, int flags);
|
D | xwrap.c | 474 int try = 9999, dirfd = open("/", 0);; in xabspath() local 506 } else len = readlinkat(dirfd, new->str, libbuf, sizeof(libbuf)); in xabspath() 522 fd = openat(dirfd, s, 0); in xabspath() 524 close(dirfd); in xabspath() 525 dirfd = fd; in xabspath() 534 close(dirfd); in xabspath() 535 dirfd = open("/", 0); in xabspath() 548 close(dirfd); in xabspath() 577 close(dirfd); in xabspath()
|
/external/ltp/testcases/network/nfs/nfs_stress/ |
D | nfs05_make_tree.c | 142 int i, k, fd, dirfd, ret; in thread_fn() local 152 dirfd = SAFE_OPEN(dirname, O_DIRECTORY); in thread_fn() 156 fd = openat(dirfd, "makefile", O_CREAT | O_RDWR, in thread_fn() 170 fd = openat(dirfd, cfile, O_CREAT | O_RDWR, in thread_fn() 184 ret = mkdirat(dirfd, "dir", 0755); in thread_fn() 187 dirfd = openat(dirfd, "dir", O_DIRECTORY); in thread_fn() 188 if (dirfd < 0) in thread_fn()
|
/external/ltp/testcases/kernel/syscalls/utimensat/ |
D | utimensat01.c | 71 utimensat_sc(int dirfd, const char *pathname, in utimensat_sc() argument 74 return ltp_syscall(__NR_utimensat, dirfd, pathname, times, flags); in utimensat_sc() 110 int flags, dirfd, opt, oflag; in main() local 121 dirfd = AT_FDCWD; in main() 154 dirfd = open(dirfdPath, oflag); in main() 155 if (dirfd == -1) in main() 224 printf("dirfd is %d\n", dirfd); in main() 238 if (utimensat_sc(dirfd, pathname, tsp, flags) == -1) { in main()
|
/external/toybox/toys/other/ |
D | lspci.c | 44 int dirfd; local 50 if (-1 == (dirfd = openat(dirtree_parentfd(new), new->name, O_RDONLY))) 55 readlinkat0(dirfd, "driver", driver, sizeof(driver)); 61 if (-1 == (fd = openat(dirfd, *fields, O_RDONLY))) { 62 close(dirfd); 72 close(dirfd);
|
/external/ltp/testcases/kernel/syscalls/fstatat/ |
D | fstatat01.c | 63 int fstatat(int dirfd, const char *filename, struct stat64 *statbuf, int flags) in fstatat() argument 65 return ltp_syscall(__NR_fstatat64, dirfd, filename, statbuf, flags); in fstatat() 68 int fstatat(int dirfd, const char *filename, struct stat *statbuf, int flags) in fstatat() argument 70 return ltp_syscall(__NR_newfstatat, dirfd, filename, statbuf, flags); in fstatat() 73 int fstatat(int dirfd, const char *filename, struct stat *statbuf, int flags) in fstatat() argument 75 return ltp_syscall(__NR_fstatat, dirfd, filename, statbuf, flags); in fstatat()
|
/external/ltp/include/lapi/ |
D | mkdirat.h | 27 int mkdirat(int dirfd, const char *dirname, int mode) in mkdirat() argument 29 return ltp_syscall(__NR_mkdirat, dirfd, dirname, mode); in mkdirat()
|
D | readlinkat.h | 27 int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz) in readlinkat() argument 29 return ltp_syscall(__NR_readlinkat, dirfd, pathname, buf, bufsiz); in readlinkat()
|
/external/ltp/testcases/kernel/syscalls/openat/ |
D | openat.h | 29 int openat(int dirfd, const char *pathname, int flags, mode_t mode) in openat() argument 31 return ltp_syscall(__NR_openat, dirfd, pathname, flags, mode); in openat()
|
/external/ltp/testcases/kernel/syscalls/mknodat/ |
D | mknodat.h | 28 int mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) in mknodat() argument 30 return ltp_syscall(__NR_mknodat, dirfd, filename, mode, dev); in mknodat()
|
/external/ltp/testcases/kernel/syscalls/fchownat/ |
D | fchownat.h | 29 static inline int fchownat(int dirfd, const char *filename, uid_t owner, in fchownat() argument 32 return ltp_syscall(__NR_fchownat, dirfd, filename, owner, group, flags); in fchownat()
|
/external/toybox/toys/posix/ |
D | ls.c | 289 static void listfiles(int dirfd, struct dirtree *indir) in listfiles() argument 297 if (-1 == dirfd) { in listfiles() 323 } else dirtree_recurse(indir, filter, dup(dirfd), in listfiles() 495 if (fstatat(dirfd, sort[next]->symlink, &st2, 0)) color = 256+31; in listfiles() 523 listfiles(openat(dirfd, sort[ul]->name, 0), sort[ul]); in listfiles() 527 if (dirfd != AT_FDCWD) close(dirfd); in listfiles() 564 TT.files->dirfd = AT_FDCWD; in ls_main()
|
/external/syslinux/extlinux/ |
D | main.c | 514 int fd = -1, dirfd = -1; in ext2_fat_install_file() local 528 dirfd = open(path, O_RDONLY | O_DIRECTORY); in ext2_fat_install_file() 529 if (dirfd < 0) { in ext2_fat_install_file() 558 close(dirfd); in ext2_fat_install_file() 589 if (dirfd >= 0) in ext2_fat_install_file() 590 close(dirfd); in ext2_fat_install_file() 673 int dirfd = -1; in xfs_install_file() local 682 dirfd = open(path, O_RDONLY | O_DIRECTORY); in xfs_install_file() 683 if (dirfd < 0) { in xfs_install_file() 713 close(dirfd); in xfs_install_file() [all …]
|
/external/ltp/testcases/kernel/syscalls/readlinkat/ |
D | readlinkat02.c | 47 int *dirfd; member 100 TEST(readlinkat(*test->dirfd, test->pathname, buf, test->bufsiz)); in readlinkat_verify()
|
/external/toybox/toys/net/ |
D | netstat.c | 237 int pid, dirfd; in scan_pids() local 246 if (-1==(dirfd = openat(dirtree_parentfd(node), s, O_RDONLY))) return 0; in scan_pids() 247 if (!(dp = fdopendir(dirfd))) { in scan_pids() 248 close(dirfd); in scan_pids() 255 if (!readlinkat0(dirfd, entry->d_name, s, sizeof(toybuf)-256)) continue; in scan_pids()
|
/external/ltp/testcases/kernel/syscalls/futimesat/ |
D | futimesat01.c | 59 int myfutimesat(int dirfd, const char *filename, struct timeval *times) in myfutimesat() argument 61 return ltp_syscall(__NR_futimesat, dirfd, filename, times); in myfutimesat()
|
/external/ltp/testcases/kernel/syscalls/unlinkat/ |
D | unlinkat01.c | 66 int myunlinkat(int dirfd, const char *filename, int flags) in myunlinkat() argument 68 return ltp_syscall(__NR_unlinkat, dirfd, filename, flags); in myunlinkat()
|
/external/ltp/testcases/kernel/syscalls/fchmodat/ |
D | fchmodat01.c | 65 int myfchmodat(int dirfd, const char *filename, mode_t mode) in myfchmodat() argument 67 return ltp_syscall(__NR_fchmodat, dirfd, filename, mode); in myfchmodat()
|
/external/ltp/testcases/kernel/syscalls/faccessat/ |
D | faccessat01.c | 65 int myfaccessat(int dirfd, const char *filename, int mode) in myfaccessat() argument 67 return ltp_syscall(__NR_faccessat, dirfd, filename, mode); in myfaccessat()
|
/external/strace/tests-mx32/ |
D | fanotify_mark.c | 47 uint64_t mask, const char *mask_str, kernel_ulong_t dirfd, in do_call() argument 65 dirfd, path); in do_call()
|
/external/strace/tests-m32/ |
D | fanotify_mark.c | 47 uint64_t mask, const char *mask_str, kernel_ulong_t dirfd, in do_call() argument 65 dirfd, path); in do_call()
|
/external/ltp/testcases/kernel/syscalls/mkdirat/ |
D | mkdirat02.c | 52 int *dirfd; member 138 TEST(mkdirat(*test->dirfd, test->pathname, 0777)); in mkdirat_verify()
|