Home
last modified time | relevance | path

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

1234

/third_party/ltp/testcases/network/nfs/nfs_stress/
Dnfs05_make_tree.c128 int i, k, fd, dirfd, ret; in thread_fn() local
138 dirfd = SAFE_OPEN(dirname, O_DIRECTORY); in thread_fn()
142 fd = openat(dirfd, "makefile", O_CREAT | O_RDWR, in thread_fn()
156 fd = openat(dirfd, cfile, O_CREAT | O_RDWR, in thread_fn()
170 ret = mkdirat(dirfd, "dir", 0755); in thread_fn()
173 dirfd = openat(dirfd, "dir", O_DIRECTORY); in thread_fn()
174 if (dirfd < 0) in thread_fn()
/third_party/toybox/lib/
Ddirtree.c36 int fd = parent ? parent->dirfd : AT_FDCWD; in dirtree_add_node()
101 return node->parent ? node->parent->dirfd : AT_FDCWD; in dirtree_parentfd()
135 int (*callback)(struct dirtree *node), int dirfd, int flags) in dirtree_recurse() argument
141 node->dirfd = dirfd; in dirtree_recurse()
142 if (node->dirfd == -1 || !(dir = fdopendir(node->dirfd))) { in dirtree_recurse()
148 close(node->dirfd); in dirtree_recurse()
177 node->dirfd = -1; in dirtree_recurse()
Dxwrap.c532 int try = 9999, dirfd = open("/", O_PATH), missing = 0; in xabspath() local
565 if (-1 == (x = openat(dirfd, "..", O_PATH))) goto error; in xabspath()
566 close(dirfd); in xabspath()
567 dirfd = x; in xabspath()
573 len = readlinkat(dirfd, new->str, libbuf, sizeof(libbuf)); in xabspath()
589 fd = openat(dirfd, new->str, O_PATH); in xabspath()
591 close(dirfd); in xabspath()
592 dirfd = fd; in xabspath()
601 close(dirfd); in xabspath()
602 dirfd = open("/", O_PATH); in xabspath()
[all …]
/third_party/toybox/porting/liteos_a/lib/
Ddirtree.c44 int fd = parent ? parent->dirfd : AT_FDCWD; in dirtree_add_node()
109 return node->parent ? node->parent->dirfd : AT_FDCWD; in dirtree_parentfd()
142 int (*callback)(struct dirtree *node), int dirfd, int flags) in dirtree_recurse() argument
148 node->dirfd = dirfd; in dirtree_recurse()
149 if (node->dirfd == -1 || !(dir = fdopendir(node->dirfd))) { in dirtree_recurse()
155 close(node->dirfd); in dirtree_recurse()
184 node->dirfd = -1; in dirtree_recurse()
/third_party/ltp/testcases/kernel/syscalls/utimensat/
Dutimensat01.c71 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()
/third_party/NuttX/fs/vfs/
Dfs_unlink.c87 int do_unlink(int dirfd, const char *pathname) in do_unlink() argument
96 ret = get_path_from_fd(dirfd, &relativepath); in do_unlink()
189 extern int do_rmdir(int dirfd, const char *pathname);
191 int unlinkat(int dirfd, const char *pathname, int flag) in unlinkat() argument
209 return do_rmdir(dirfd, pathname); in unlinkat()
211 return do_unlink(dirfd, pathname); in unlinkat()
Dfs_readlink.c35 ssize_t do_readlink(int dirfd, const char *path, char *buf, size_t bufsize) in do_readlink() argument
53 ret = vfs_normalize_pathat(dirfd, path, &fullpath); in do_readlink()
103 ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsize) in readlinkat() argument
105 return do_readlink(dirfd, pathname, buf, bufsize); in readlinkat()
Dfs_mkdir.c53 int do_mkdir(int dirfd, const char *pathname, mode_t mode) in do_mkdir() argument
67 ret = get_path_from_fd(dirfd, &relativepath); in do_mkdir()
191 int mkdirat(int dirfd, const char *pathname, mode_t mode) in mkdirat() argument
193 return do_mkdir(dirfd, pathname, mode); in mkdirat()
Dfs_open.c158 int fp_open(int dirfd, const char *path, int oflags, mode_t mode) in fp_open() argument
168 ret = follow_symlink(dirfd, path, &vnode, &fullpath); in fp_open()
313 int do_open(int dirfd, const char *path, int oflags, mode_t mode) in do_open() argument
324 fd = fp_open(dirfd, path, oflags, mode); in do_open()
/third_party/ltp/testcases/kernel/syscalls/fstatat/
Dfstatat01.c63 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()
/third_party/toybox/toys/other/
Dlspci.c44 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);
/third_party/ltp/include/lapi/
Dfsmount.h41 int fspick(int dirfd, const char *pathname, unsigned int flags) in fspick() argument
43 return tst_syscall(__NR_fspick, dirfd, pathname, flags); in fspick()
57 int open_tree(int dirfd, const char *pathname, unsigned int flags) in open_tree() argument
59 return tst_syscall(__NR_open_tree, dirfd, pathname, flags); in open_tree()
Dmkdirat.h14 int mkdirat(int dirfd, const char *dirname, int mode) in mkdirat() argument
16 return ltp_syscall(__NR_mkdirat, dirfd, dirname, mode); in mkdirat()
Dreadlinkat.h14 int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz) in readlinkat() argument
16 return ltp_syscall(__NR_readlinkat, dirfd, pathname, buf, bufsiz); in readlinkat()
Dexecveat.h14 int execveat(int dirfd, const char *pathname, in execveat() argument
18 return tst_syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); in execveat()
/third_party/musl/src/linux/
Dname_to_handle_at.c5 int name_to_handle_at(int dirfd, const char *pathname, in name_to_handle_at() argument
8 return syscall(SYS_name_to_handle_at, dirfd, in name_to_handle_at()
/third_party/ltp/testcases/kernel/syscalls/openat/
Dopenat.h29 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()
/third_party/ltp/testcases/kernel/syscalls/mknodat/
Dmknodat.h29 int mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) in mknodat() argument
31 return ltp_syscall(__NR_mknodat, dirfd, filename, mode, dev); in mknodat()
/third_party/ltp/testcases/kernel/syscalls/fchownat/
Dfchownat.h29 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()
/third_party/musl/compat/time32/
Dfutimesat_time32.c7 int __futimesat_time32(int dirfd, const char *pathname, const struct timeval32 times32[2]) in __futimesat_time32() argument
9 return futimesat(dirfd, pathname, !times32 ? 0 : ((struct timeval[2]){ in __futimesat_time32()
/third_party/musl/src/stat/
Dfutimesat.c7 int __futimesat(int dirfd, const char *pathname, const struct timeval times[2]) in __futimesat() argument
19 return utimensat(dirfd, pathname, times ? ts : 0, 0); in __futimesat()
/third_party/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify09.c175 int ret, dirfd; in test_fanotify() local
191 dirfd = SAFE_OPEN(tc->testdir, O_RDONLY); in test_fanotify()
192 if (dirfd >= 0) in test_fanotify()
193 SAFE_CLOSE(dirfd); in test_fanotify()
/third_party/ltp/testcases/kernel/syscalls/open_tree/
Dopen_tree02.c14 int dirfd; member
28 TEST(open_tree(tc->dirfd, tc->pathname, tc->flags)); in run()
/third_party/ltp/testcases/kernel/syscalls/fspick/
Dfspick02.c14 int dirfd; member
28 TEST(fspick(tc->dirfd, tc->pathname, tc->flags)); in run()
/third_party/ltp/testcases/kernel/syscalls/mkdirat/
Dmkdirat02.c26 int *dirfd; member
57 TEST(mkdirat(*test->dirfd, test->pathname, 0777)); in mkdirat_verify()

1234