Home
last modified time | relevance | path

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

12345

/external/toybox/lib/
Ddirtree.c36 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()
Dxwrap.c525 int try = 9999, dirfd = open("/", O_PATH), missing = 0; in xabspath() local
558 if (-1 == (x = openat(dirfd, "..", O_PATH))) goto error; in xabspath()
559 close(dirfd); in xabspath()
560 dirfd = x; in xabspath()
566 len = readlinkat(dirfd, new->str, libbuf, sizeof(libbuf)); in xabspath()
582 fd = openat(dirfd, new->str, O_PATH); in xabspath()
584 close(dirfd); in xabspath()
585 dirfd = fd; in xabspath()
594 close(dirfd); in xabspath()
595 dirfd = open("/", O_PATH); in xabspath()
[all …]
/external/ltp/testcases/network/nfs/nfs_stress/
Dnfs05_make_tree.c142 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/
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()
/external/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()
/external/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);
/external/linux-kselftest/tools/testing/selftests/proc/
Dread.c43 fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK); in f_reg()
56 fd = openat(dirfd(d), filename, O_WRONLY); in f_reg_write()
69 rv = readlinkat(dirfd(d), filename, buf, sizeof(buf)); in f_lnk()
105 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY); in f()
/external/linux-kselftest/tools/testing/selftests/bpf/
Dcgroup_helpers.c191 int dirfd, err, flags, mount_id, fhsize; in get_cgroup_id() local
202 dirfd = AT_FDCWD; in get_cgroup_id()
210 err = name_to_handle_at(dirfd, cgroup_workdir, fhp, &mount_id, flags); in get_cgroup_id()
222 err = name_to_handle_at(dirfd, cgroup_workdir, fhp2, &mount_id, flags); in get_cgroup_id()
/external/syzkaller/vendor/golang.org/x/sys/unix/
Dzsyscall_linux_s390x.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_386.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_mipsle.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_mips64le.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_sparc64.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_arm.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_mips64.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_amd64.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_mips.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
Dzsyscall_linux_ppc64.go17 func fchmodat(dirfd int, path string, mode uint32) (err error) {
23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
68 …r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), ui…
89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
101 …r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), …
131 func Unlinkat(dirfd int, path string, flags int) (err error) {
137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
152 …_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.P…
[all …]
/external/ltp/include/lapi/
Dmkdirat.h27 int mkdirat(int dirfd, const char *dirname, int mode) in mkdirat() argument
29 return ltp_syscall(__NR_mkdirat, dirfd, dirname, mode); in mkdirat()
Dreadlinkat.h27 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()
Dexecveat.h33 int execveat(int dirfd, const char *pathname, in execveat() argument
37 return tst_syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); in execveat()
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify09.c156 int ret, dirfd; in test_fanotify() local
172 dirfd = SAFE_OPEN(DIR_NAME, O_RDONLY); in test_fanotify()
173 if (dirfd >= 0) in test_fanotify()
174 SAFE_CLOSE(dirfd); in test_fanotify()
/external/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()
/external/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()
/external/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()

12345