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

/linux-master/tools/testing/selftests/proc/
H A Dread.c45 fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK);
60 fd = openat(dirfd(d), filename, O_WRONLY);
73 rv = readlinkat(dirfd(d), filename, buf, sizeof(buf));
109 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY);
137 if (fstatfs(dirfd(d), &sfs) == -1) {
H A Dfd-003-kthread.c116 static inline int sys_statx(int dirfd, const char *pathname, int flags, argument
119 return syscall(SYS_statx, dirfd, pathname, flags, mask, stx);
H A Dfd-001-lookup.c136 if (fd == dirfd(d))
H A Dproc-pid-vm.c51 static inline long sys_execveat(int dirfd, const char *pathname, char **argv, char **envp, int flags) argument
53 return syscall(SYS_execveat, dirfd, pathname, argv, envp, flags);
/linux-master/tools/perf/util/
H A Dpmu.h215 int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load);
235 FILE *perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name);
239 int perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name,
270 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags);
272 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *lookup_name);
H A Dpmu.c185 int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load) argument
191 format_dir = fdopendir(dirfd);
210 int fd = openat(dirfd, name, O_RDONLY);
235 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name) argument
239 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY);
690 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *name, bool is_core) argument
705 file = perf_pmu__open_file_at(&pmu, dirfd, *template);
718 static bool pmu_is_uncore(int dirfd, const char *name) argument
722 fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
958 static char *pmu_find_alias_name(struct perf_pmu *pmu, int dirfd) argument
981 pmu_max_precise(int dirfd, struct perf_pmu *pmu) argument
996 perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *name) argument
1800 perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name) argument
1828 perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name, const char *fmt, ...) argument
2067 perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags) argument
[all...]
H A Dpmus.c106 int dirfd; local
125 dirfd = perf_pmu__event_source_devices_fd();
126 pmu = perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name);
127 close(dirfd);
140 static struct perf_pmu *perf_pmu__find2(int dirfd, const char *name) argument
161 return perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name);
H A Dutil.h61 int scandirat(int dirfd, const char *dirp,
H A Dutil.c557 int scandirat(int dirfd, const char *dirp, argument
563 int err, fd = openat(dirfd, dirp, O_PATH);
/linux-master/tools/testing/selftests/openat2/
H A Drename_attack_test.c54 /* Swap @dirfd/@a and @dirfd/@b constantly. Parent must kill this process. */
55 pid_t spawn_attack(int dirfd, char *a, char *b) argument
66 renameat2(dirfd, a, dirfd, b, RENAME_EXCHANGE);
/linux-master/tools/perf/arch/x86/util/
H A Dintel-pt.c188 int dirfd; local
190 dirfd = perf_pmu__event_source_devices_fd();
194 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc", "%d",
199 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc_periods", "%x",
209 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_cyc", "%d",
214 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_periods", "%x",
224 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/pt", "%c", &c) == 1 &&
225 perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/branch", "%c", &c) == 1)
232 close(dirfd);
477 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, int dirfd, argument
520 int err, dirfd; local
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Dcgroup_helpers.c434 int dirfd, err, flags, mount_id, fhsize; local
442 dirfd = AT_FDCWD;
450 err = name_to_handle_at(dirfd, cgroup_workdir, fhp, &mount_id, flags);
462 err = name_to_handle_at(dirfd, cgroup_workdir, fhp2, &mount_id, flags);
/linux-master/tools/testing/selftests/iommu/
H A Diommufd_fail_nth.c65 if (writeat(dirfd(debugfs), "failslab/ignore-gfp-wait", "N"))
67 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-wait", "N");
68 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-highmem", "N");
78 writeat(dirfd(debugfs), fn, "0");
/linux-master/fs/nfs/
H A Dnfs4super.c158 .dirfd = -1,
164 .dirfd = -1,
/linux-master/fs/
H A Dfs_parser.c169 ret = filename_lookup(param->dirfd, f, flags, _path, NULL);
300 result->uint_32 = param->dirfd;
H A Dfsopen.c459 param.dirfd = aux;
468 param.dirfd = aux;
/linux-master/tools/testing/selftests/landlock/
H A Dfs_test.c384 static int test_open_rel(const int dirfd, const char *const path, argument
390 fd = openat(dirfd, path, flags | O_CLOEXEC);
1818 int dirfd, ruleset_fd; local
1848 dirfd = open(dir_s1d2, O_DIRECTORY);
1849 ASSERT_LE(0, dirfd);
1853 dirfd = AT_FDCWD;
1861 dirfd = AT_FDCWD;
1869 dirfd = AT_FDCWD;
1874 test_open_rel(dirfd, "..", O_RDONLY));
1875 ASSERT_EQ(0, test_open_rel(dirfd, "
[all...]
/linux-master/fs/bcachefs/
H A Dfs-ioctl.c348 error = user_path_at(arg.dirfd,
363 dst_dentry = user_path_create(arg.dirfd,
454 victim = user_path_locked_at(arg.dirfd, name, &path);
H A Dbcachefs_ioctl.h382 __u32 dirfd; member in struct:bch_ioctl_subvolume
/linux-master/tools/power/cpupower/lib/
H A Dpowercap.c217 if (fstatat(dirfd(zone_dir), dent->d_name, &st, 0) < 0)
/linux-master/include/linux/
H A Dfs_context.h56 fs_value_is_filename, /* Value is a filename* + dirfd */
73 int dirfd; member in struct:fs_parameter

Completed in 258 milliseconds