Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 462) sorted by relevance

12345678910>>...19

/tools/testing/selftests/openat2/
A Dresolve_test.c112 const char *path; member
117 const char *path; member
171 .out.path = "etc", .pass = true }, in test_openat2_opath_tests()
214 .out.path = NULL, .pass = true }, in test_openat2_opath_tests()
217 .out.path = NULL, .pass = true }, in test_openat2_opath_tests()
220 .out.path = NULL, .pass = true }, in test_openat2_opath_tests()
223 .out.path = NULL, .pass = true }, in test_openat2_opath_tests()
331 .out.path = "/", .pass = true }, in test_openat2_opath_tests()
334 .out.path = "/", .pass = true }, in test_openat2_opath_tests()
384 .out.path = NULL, .pass = true }, in test_openat2_opath_tests()
[all …]
A Dhelpers.c24 int ret = syscall(__NR_openat2, dfd, path, how, size); in raw_openat2()
30 return raw_openat2(dfd, path, how, sizeof(*how)); in sys_openat2()
33 int sys_openat(int dfd, const char *path, struct open_how *how) in sys_openat() argument
35 int ret = openat(dfd, path, how->flags, how->mode); in sys_openat()
47 int touchat(int dfd, const char *path) in touchat() argument
49 int fd = openat(dfd, path, O_CREAT, 0700); in touchat()
71 bool fdequal(int fd, int dfd, const char *path) in fdequal() argument
79 if (!path) in fdequal()
81 else if (*path == '/') in fdequal()
82 E_asprintf(&other, "%s", path); in fdequal()
[all …]
/tools/perf/util/
A Dtrace-event-info.c94 if (!path) { in record_header_files()
117 if (!path) { in record_header_files()
226 char *path; in record_ftrace_files() local
257 char *path; in record_event_files() local
338 char *path; in record_ftrace_printk() local
366 char *path; in record_saved_cmdline() local
444 path = zalloc(sizeof(*path)); in tracepoint_id_to_path()
475 if (path && asprintf(&buf, "%s:%s", path->system, path->name) < 0) in tracepoint_id_to_name()
484 struct tracepoint_path *path = zalloc(sizeof(*path)); in tracepoint_name_to_path() local
495 if (path->system == NULL || path->name == NULL) { in tracepoint_name_to_path()
[all …]
A Dpath.c13 static char *cleanup_path(char *path) in cleanup_path() argument
16 if (!memcmp(path, "./", 2)) { in cleanup_path()
17 path += 2; in cleanup_path()
18 while (*path == '/') in cleanup_path()
19 path++; in cleanup_path()
21 return path; in cleanup_path()
61 char path[PATH_MAX]; in is_directory() local
64 snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name); in is_directory()
65 if (stat(path, &st)) in is_directory()
71 bool is_directory_at(int dir_fd, const char *path) in is_directory_at() argument
[all …]
A Ddata.c27 zfree(&files[nr].path); in close_dir()
53 ret = asprintf(&file->path, "%s/data.%d", data->path, i); in perf_data__create_dir()
119 snprintf(path, sizeof(path), "%s/%s", data->path, dent->d_name); in perf_data__open_dir()
135 file->path = strdup(path); in perf_data__open_dir()
136 if (!file->path) in perf_data__open_dir()
168 if (!data->path) { in check_pipe()
212 data->path); in check_backup()
274 data->file.path); in open_file_read()
319 data->file.path = strdup(data->path); in open_file_dup()
334 if (asprintf(&data->file.path, "%s/data", data->path) < 0) in open_dir()
[all …]
A Dutil.c104 char *d = path; in mkdir_p()
109 if (stat(path, &st) == 0) in mkdir_p()
116 err = stat(path, &st) && mkdir(path, mode); in mkdir_p()
123 return (stat(path, &st) && mkdir(path, mode)) ? -1 : 0; in mkdir_p()
172 return unlink(path); in rm_rf_depth_pat()
175 dir = opendir(path); in rm_rf_depth_pat()
190 path, d->d_name); in rm_rf_depth_pat()
209 return rmdir(path); in rm_rf_depth_pat()
268 rm_rf_kcore_dir(path); in rm_rf_perf_data()
489 char path[PATH_MAX]; in scandirat() local
[all …]
/tools/lib/api/fs/
A Dfs.c94 char *path; member
168 fs->path = strdup(path); in fs__read_mounts()
197 if (!fs->path) in fs__check_mounts()
237 if (!fs->path) in fs__env_override()
255 return fs->path; in fs__mountpoint()
393 snprintf(path, sizeof(path), "%s/%s", procfs, entry); in procfs__read_str()
407 snprintf(path, sizeof(path), "%s/%s", sysfs, entry); in sysfs__read_ull_base()
430 snprintf(path, sizeof(path), "%s/%s", sysfs, entry); in sysfs__read_int()
443 snprintf(path, sizeof(path), "%s/%s", sysfs, entry); in sysfs__read_str()
459 snprintf(path, sizeof(path), "%s/%s", sysfs, entry); in sysfs__read_bool()
[all …]
/tools/testing/selftests/mm/
A Dthp_settings.c108 perror(path); in write_num()
115 char path[PATH_MAX]; in thp_read_string() local
127 perror(path); in thp_read_string()
160 char path[PATH_MAX]; in thp_write_string() local
170 perror(path); in thp_write_string()
177 char path[PATH_MAX]; in thp_read_num() local
190 char path[PATH_MAX]; in thp_write_num() local
198 write_num(path, num); in thp_write_num()
205 char path[PATH_MAX]; in thp_read_settings() local
257 char path[PATH_MAX]; in thp_write_settings() local
[all …]
/tools/power/cpupower/utils/helpers/
A Dmisc.c54 char path[SYSFS_PATH_MAX]; in cpupower_intel_get_perf_bias() local
61 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/power/energy_perf_bias", cpu); in cpupower_intel_get_perf_bias()
75 char path[SYSFS_PATH_MAX]; in cpupower_intel_set_perf_bias() local
81 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/power/energy_perf_bias", cpu); in cpupower_intel_set_perf_bias()
92 char path[SYSFS_PATH_MAX]; in cpupower_set_epp() local
95 snprintf(path, sizeof(path), in cpupower_set_epp()
98 if (!is_valid_path(path)) in cpupower_set_epp()
114 snprintf(path, sizeof(path), PATH_TO_CPU "amd_pstate/status"); in cpupower_set_amd_pstate_mode()
116 if (!is_valid_path(path)) in cpupower_set_amd_pstate_mode()
132 snprintf(path, sizeof(path), PATH_TO_CPU "cpufreq/boost"); in cpupower_set_turbo_boost()
[all …]
A Dsysfs.c23 fd = open(path, O_RDONLY); in sysfs_read_file()
49 char path[SYSFS_PATH_MAX]; in sysfs_is_cpu_online() local
57 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u", cpu); in sysfs_is_cpu_online()
66 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/online", cpu); in sysfs_is_cpu_online()
70 fd = open(path, O_RDONLY); in sysfs_is_cpu_online()
107 char path[SYSFS_PATH_MAX]; in sysfs_idlestate_file_exists() local
111 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in sysfs_idlestate_file_exists()
127 char path[SYSFS_PATH_MAX]; in sysfs_idlestate_read_file() local
131 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in sysfs_idlestate_read_file()
166 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in sysfs_idlestate_write_file()
[all …]
/tools/verification/rvgen/rvgen/
A Dgenerator.py19 os.path.join(os.path.dirname(__file__), "templates", self.template_dir)
47 if os.path.exists(os.path.join(kernel_path, "rv_trace.h")):
53 def _read_file(self, path): argument
55 fd = open(path, 'r')
66 path = os.path.join(self.abs_template_dir, file)
71 path = os.path.join(self.abs_template_dir, "..", file)
197 path = self.name
199 path = os.path.join(self.rv_dir, "monitors", path)
201 os.mkdir(path)
220 path = os.path.join(self.rv_dir, "monitors", path)
[all …]
/tools/hv/
A Dvmbus_testing30 if not os.path.isdir(debugfs_hyperv_path):
78 path = args.path if "path" in arg_set else None
79 if (path and path[-1] == "/"):
80 path = path[:-1]
138 def get_device_test_values(path, file_map):
140 for name in file_map[path]:
146 def recursive_file_lookup(path, file_map):
175 def read_test_files(path):
177 with open(path,"r") as f:
191 def write_test_files(path, value):
[all …]
/tools/power/cpupower/lib/
A Dcpupower.c20 if (access(path, F_OK) == -1) in is_valid_path()
30 fd = open(path, O_RDONLY); in cpupower_read_sysfs()
51 fd = open(path, O_WRONLY); in cpupower_write_sysfs()
57 perror(path); in cpupower_write_sysfs()
77 char path[SYSFS_PATH_MAX]; in cpupower_is_cpu_online() local
85 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u", cpu); in cpupower_is_cpu_online()
94 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/online", cpu); in cpupower_is_cpu_online()
98 fd = open(path, O_RDONLY); in cpupower_is_cpu_online()
124 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", in sysfs_topology_read_file()
201 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/topology/%s", in get_cpu_topology()
[all …]
/tools/testing/selftests/devices/probe/
A Dtest_discoverable_devices.py25 this_dir = os.path.dirname(os.path.realpath(__file__))
26 sys.path.append(os.path.join(this_dir, "../../kselftest/"))
41 for path, dirs, _ in os.walk(sysfs_devices):
44 pci_controllers.append(os.path.join(path, d))
53 usb_controllers.append(os.path.realpath(d.path))
143 def path_to_dir(parent_sysfs, dev_type, path): argument
147 dirname = os.path.join(
150 return [os.path.realpath(dirname)]
154 for dev_func in path.split("/"):
340 if not os.path.exists(args.boards_dir):
[all …]
/tools/lib/subcmd/
A Dexec-cmd.c36 return path[0] == '/'; in is_absolute_path()
59 if (is_absolute_path(path)) { in make_nonrelative_path()
60 if (strlcpy(buf, path, sz) >= sz) in make_nonrelative_path()
61 die("Too long path: %.*s", 60, path); in make_nonrelative_path()
72 strcat(buf, path); in make_nonrelative_path()
77 char *system_path(const char *path) in system_path() argument
81 if (is_absolute_path(path)) in system_path()
82 return strdup(path); in system_path()
135 if (path && *path) { in add_path()
136 if (is_absolute_path(path)) in add_path()
[all …]
/tools/testing/selftests/damon/
A D_damon_sysfs.py18 if not os.path.exists(sysfs_root):
22 def write_file(path, string): argument
26 with open(path, 'w') as f:
32 def read_file(path): argument
36 with open(path, 'r') as f:
168 err = write_file(os.path.join(
172 err = write_file(os.path.join(
177 err = write_file(os.path.join(
434 return os.path.join(
486 return os.path.join(
[all …]
/tools/perf/tests/
A Dapi-io.c42 strcpy(path, TEMPL); in make_test_file()
43 fd = mkstemp(path); in make_test_file()
51 unlink(path); in make_test_file()
67 unlink(path); in setup_test()
74 unlink(path); in setup_test()
85 unlink(path); in cleanup_test()
90 char path[PATH_MAX]; in do_test_get_char() local
108 cleanup_test(path, &io); in do_test_get_char()
137 char path[PATH_MAX]; in do_test_get_hex() local
218 char path[PATH_MAX]; in do_test_get_dec() local
[all …]
/tools/testing/selftests/lsm/
A Dcommon.c24 char *path; in read_proc_attr() local
27 path = calloc(len, 1); in read_proc_attr()
28 if (path == NULL) in read_proc_attr()
30 sprintf(path, "%s%s", PROCATTR, attr); in read_proc_attr()
32 fd = open(path, O_RDONLY); in read_proc_attr()
33 free(path); in read_proc_attr()
46 path = strchr(value, '\n'); in read_proc_attr()
47 if (path) in read_proc_attr()
48 *path = '\0'; in read_proc_attr()
/tools/testing/selftests/efivarfs/
A Dopen-unlink.c13 static int set_immutable(const char *path, int immutable) in set_immutable() argument
20 fd = open(path, O_RDONLY); in set_immutable()
44 static int get_immutable(const char *path) in get_immutable() argument
51 fd = open(path, O_RDONLY); in get_immutable()
70 const char *path; in main() local
79 path = argv[1]; in main()
89 fd = open(path, O_WRONLY | O_CREAT, 0600); in main()
103 rc = get_immutable(path); in main()
108 rc = set_immutable(path, 0); in main()
115 fd = open(path, O_RDONLY); in main()
[all …]
/tools/testing/selftests/sched_ext/
A Dutil.c14 static ssize_t read_text(const char *path, char *buf, size_t max_len) in read_text() argument
19 fd = open(path, O_RDONLY); in read_text()
33 static ssize_t write_text(const char *path, char *buf, ssize_t len) in write_text() argument
38 fd = open(path, O_WRONLY | O_APPEND); in write_text()
47 long file_read_long(const char *path) in file_read_long() argument
52 if (read_text(path, buf, sizeof(buf)) <= 0) in file_read_long()
58 int file_write_long(const char *path, long val) in file_write_long() argument
67 if (write_text(path, buf, sizeof(buf)) <= 0) in file_write_long()
/tools/include/nolibc/
A Dfcntl.h22 int sys_openat(int dirfd, const char *path, int flags, mode_t mode) in sys_openat() argument
24 return my_syscall4(__NR_openat, dirfd, path, flags, mode); in sys_openat()
28 int openat(int dirfd, const char *path, int flags, ...) in openat() argument
40 return __sysret(sys_openat(dirfd, path, flags, mode)); in openat()
48 int sys_open(const char *path, int flags, mode_t mode) in sys_open() argument
50 return my_syscall4(__NR_openat, AT_FDCWD, path, flags, mode); in sys_open()
54 int open(const char *path, int flags, ...) in open() argument
66 return __sysret(sys_open(path, flags, mode)); in open()
A Dsys.h124 int sys_chdir(const char *path) in sys_chdir() argument
130 int chdir(const char *path) in chdir() argument
132 return __sysret(sys_chdir(path)); in chdir()
187 int sys_chroot(const char *path) in sys_chroot() argument
193 int chroot(const char *path) in chroot() argument
195 return __sysret(sys_chroot(path)); in chroot()
661 int sys_rmdir(const char *path) in sys_rmdir() argument
673 int rmdir(const char *path) in rmdir() argument
675 return __sysret(sys_rmdir(path)); in rmdir()
930 int sys_unlink(const char *path) in sys_unlink() argument
[all …]
/tools/testing/selftests/filesystems/nsfs/
A Dpidns.c44 char path[] = "/proc/0123456789/ns/pid"; in main() local
55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); in main()
56 ns = open(path, O_RDONLY); in main()
58 return pr_err("Unable to open %s", path); in main()
64 snprintf(path, sizeof(path), "/proc/self/ns/%s", ns_strs[i]); in main()
65 if (stat(path, &st2)) in main()
66 return pr_err("Unable to stat %s", path); in main()
/tools/testing/selftests/devices/probe/boards/
A DDell Inc.,XPS 13 9300.yaml17 - path: 14.0
21 - path: 9
24 - path: 10
27 - path: 2.0
29 - path: 4.0
31 - path: 12.0
33 - path: 14.3
35 - path: 1d.0/0.0
37 - path: 1d.7/0.0
39 - path: 1f.3
/tools/testing/selftests/memfd/
A Dfuse_mnt.c27 static int memfd_getattr(const char *path, struct stat *st) in memfd_getattr() argument
31 if (!strcmp(path, "/")) { in memfd_getattr()
34 } else if (!strcmp(path, memfd_path)) { in memfd_getattr()
45 static int memfd_readdir(const char *path, in memfd_readdir() argument
51 if (strcmp(path, "/")) in memfd_readdir()
61 static int memfd_open(const char *path, struct fuse_file_info *fi) in memfd_open() argument
63 if (strcmp(path, memfd_path)) in memfd_open()
75 static int memfd_read(const char *path, in memfd_read() argument
83 if (strcmp(path, memfd_path) != 0) in memfd_read()

Completed in 40 milliseconds

12345678910>>...19