Home
last modified time | relevance | path

Searched refs:PATH_MAX (Results 1 – 25 of 171) sorted by relevance

1234567

/Linux-v5.4/tools/perf/util/
Dcgroup.c20 char mountpoint[PATH_MAX + 1], tokens[PATH_MAX + 1], type[PATH_MAX + 1]; in cgroupfs_find_mountpoint()
21 char path_v1[PATH_MAX + 1], path_v2[PATH_MAX + 2], *path; in cgroupfs_find_mountpoint()
36 while (fscanf(fp, "%*s %"__stringify(PATH_MAX)"s %"__stringify(PATH_MAX)"s %" in cgroupfs_find_mountpoint()
37 __stringify(PATH_MAX)"s %*d %*d\n", in cgroupfs_find_mountpoint()
77 char path[PATH_MAX + 1]; in open_cgroup()
78 char mnt[PATH_MAX + 1]; in open_cgroup()
82 if (cgroupfs_find_mountpoint(mnt, PATH_MAX + 1)) in open_cgroup()
85 scnprintf(path, PATH_MAX, "%s/%s", mnt, name); in open_cgroup()
Dcpumap.c100 char path[PATH_MAX]; in cpu__get_topology_int()
102 snprintf(path, PATH_MAX, in cpu__get_topology_int()
289 char path[PATH_MAX]; in set_max_cpu_num()
301 ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/possible", mnt); in set_max_cpu_num()
302 if (ret == PATH_MAX) { in set_max_cpu_num()
303 pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); in set_max_cpu_num()
312 ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/present", mnt); in set_max_cpu_num()
313 if (ret == PATH_MAX) { in set_max_cpu_num()
314 pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX); in set_max_cpu_num()
329 char path[PATH_MAX]; in set_max_node_num()
[all …]
Dnamespaces.c65 char oldns[PATH_MAX]; in nsinfo__init()
66 char spath[PATH_MAX]; in nsinfo__init()
75 if (snprintf(oldns, PATH_MAX, "/proc/self/ns/mnt") >= PATH_MAX) in nsinfo__init()
99 if (snprintf(spath, PATH_MAX, "/proc/%d/status", nsi->pid) >= PATH_MAX) in nsinfo__init()
204 char curpath[PATH_MAX]; in nsinfo__mountns_enter()
218 if (snprintf(curpath, PATH_MAX, "/proc/self/ns/mnt") >= PATH_MAX) in nsinfo__mountns_enter()
Dpath.c31 static char pathname_array[4][PATH_MAX]; in get_pathname()
55 len = vsnprintf(pathname, PATH_MAX, fmt, args); in mkpath()
57 if (len >= PATH_MAX) in mkpath()
86 char path[PATH_MAX]; in is_directory()
Dpmu.c55 char path[PATH_MAX]; in perf_pmu__format_parse()
62 snprintf(path, PATH_MAX, "%s/%s", dir, name); in perf_pmu__format_parse()
86 char path[PATH_MAX]; in pmu_format()
92 snprintf(path, PATH_MAX, in pmu_format()
147 char path[PATH_MAX]; in perf_pmu__parse_scale()
149 scnprintf(path, PATH_MAX, "%s/%s.scale", dir, name); in perf_pmu__parse_scale()
175 char path[PATH_MAX]; in perf_pmu__parse_unit()
179 scnprintf(path, PATH_MAX, "%s/%s.unit", dir, name); in perf_pmu__parse_unit()
206 char path[PATH_MAX]; in perf_pmu__parse_per_pkg()
209 scnprintf(path, PATH_MAX, "%s/%s.per-pkg", dir, name); in perf_pmu__parse_per_pkg()
[all …]
Dllvm-utils.c74 char buf[PATH_MAX]; in search_program()
81 strlcpy(output, def, PATH_MAX); in search_program()
100 strlcpy(output, buf, PATH_MAX); in search_program()
439 char clang_path[PATH_MAX], llc_path[PATH_MAX], abspath[PATH_MAX], nr_cpus_avail_str[64]; in llvm__compile_bpf()
576 char clang_path[PATH_MAX]; in llvm__search_clang()
/Linux-v5.4/tools/lib/subcmd/
Dexec-cmd.c15 #define PATH_MAX 4096 macro
38 static char cwd[PATH_MAX + 1]; in get_pwd_cwd()
41 if (getcwd(cwd, PATH_MAX) == NULL) in get_pwd_cwd()
49 strlcpy(cwd, pwd, PATH_MAX); in get_pwd_cwd()
57 static char buf[PATH_MAX + 1]; in make_nonrelative_path()
60 if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) in make_nonrelative_path()
66 if (snprintf(buf, PATH_MAX, "%s/%s", cwd, path) >= PATH_MAX) in make_nonrelative_path()
/Linux-v5.4/samples/mic/mpssd/
Dsysfs.c17 char filename[PATH_MAX]; in readsysfs()
24 snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); in readsysfs()
26 snprintf(filename, PATH_MAX, in readsysfs()
59 char filename[PATH_MAX]; in setsysfs()
64 snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); in setsysfs()
66 snprintf(filename, PATH_MAX, "%s/%s/%s", in setsysfs()
/Linux-v5.4/tools/perf/tests/
Dpmu.c90 static char dir[PATH_MAX]; in test_format_dir_get()
93 snprintf(dir, PATH_MAX, "/tmp/perf-pmu-test-format-XXXXXX"); in test_format_dir_get()
98 static char name[PATH_MAX]; in test_format_dir_get()
102 scnprintf(name, PATH_MAX, "%s/%s", dir, format->name); in test_format_dir_get()
120 char buf[PATH_MAX]; in test_format_dir_put()
121 snprintf(buf, PATH_MAX, "rm -f %s/*\n", dir); in test_format_dir_put()
125 snprintf(buf, PATH_MAX, "rmdir %s\n", dir); in test_format_dir_put()
Dattr.c71 char path[PATH_MAX]; in store_event()
76 snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir, in store_event()
169 char cmd[3*PATH_MAX]; in run_dir()
174 scnprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s", in run_dir()
183 char path_perf[PATH_MAX]; in test__attr()
184 char path_dir[PATH_MAX]; in test__attr()
191 snprintf(path_dir, PATH_MAX, "%s/tests", get_argv_exec_path()); in test__attr()
192 snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR); in test__attr()
/Linux-v5.4/usr/
Dgen_init_cpio.c136 char name[PATH_MAX + 1]; in cpio_mkslink_line()
137 char target[PATH_MAX + 1]; in cpio_mkslink_line()
143 …if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &ui… in cpio_mkslink_line()
208 char name[PATH_MAX + 1]; in cpio_mkgeneric_line()
214 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { in cpio_mkgeneric_line()
276 char name[PATH_MAX + 1]; in cpio_mknod_line()
285 if (7 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d %c %u %u", in cpio_mknod_line()
385 char expanded[PATH_MAX + 1]; in cpio_replace_env()
402 char name[PATH_MAX + 1]; in cpio_mkfile_line()
404 char location[PATH_MAX + 1]; in cpio_mkfile_line()
[all …]
/Linux-v5.4/tools/testing/selftests/bpf/
Dcgroup_helpers.c46 char path[PATH_MAX + 1]; in enable_all_controllers()
47 char buf[PATH_MAX]; in enable_all_controllers()
101 char cgroup_workdir[PATH_MAX + 1]; in setup_cgroup_environment()
145 char cgroup_procs_path[PATH_MAX + 1]; in join_cgroup_from_top()
180 char cgroup_path[PATH_MAX + 1]; in join_cgroup()
201 char cgroup_workdir[PATH_MAX + 1]; in cleanup_cgroup_environment()
220 char cgroup_path[PATH_MAX + 1]; in create_and_get_cgroup()
253 char cgroup_workdir[PATH_MAX + 1]; in get_cgroup_id()
/Linux-v5.4/tools/lib/api/fs/
Dtracing_path.c16 static char tracing_mnt[PATH_MAX] = "/sys/kernel/debug";
17 static char tracing_path[PATH_MAX] = "/sys/kernel/debug/tracing";
18 static char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events";
120 char filename[PATH_MAX]; in tracing_path__strerror_open_tp()
122 snprintf(filename, PATH_MAX, "%s/%s", sys, name ?: "*"); in tracing_path__strerror_open_tp()
Dfs.c91 char path[PATH_MAX];
153 fscanf(fp, "%*s %" STR(PATH_MAX) "s %99s %*s %*d %*d\n", in fs__read_mounts()
424 char path[PATH_MAX]; in procfs__read_str()
438 char path[PATH_MAX]; in sysfs__read_ull_base()
461 char path[PATH_MAX]; in sysfs__read_int()
474 char path[PATH_MAX]; in sysfs__read_str()
516 char path[PATH_MAX]; in sysctl__read_int()
529 char path[PATH_MAX]; in sysfs__write_int()
535 if (snprintf(path, sizeof(path), "%s/%s", sysfs, entry) >= PATH_MAX) in sysfs__write_int()
Dfs.h12 #ifndef PATH_MAX
13 #define PATH_MAX 4096 macro
/Linux-v5.4/tools/perf/jvmti/
Djvmti_agent.c45 static char jit_path[PATH_MAX];
149 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/", base); in create_jit_cache_dir()
150 if (ret >= PATH_MAX) { in create_jit_cache_dir()
164 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/jit", base); in create_jit_cache_dir()
165 if (ret >= PATH_MAX) { in create_jit_cache_dir()
179 ret = snprintf(jit_path, PATH_MAX, "%s/.debug/jit/%s.XXXXXXXX", base, str); in create_jit_cache_dir()
180 if (ret >= PATH_MAX) { in create_jit_cache_dir()
248 char dump_path[PATH_MAX]; in jvmti_open()
276 ret = snprintf(dump_path, PATH_MAX, "%s/jit-%i.dump", jit_path, getpid()); in jvmti_open()
277 if (ret >= PATH_MAX) { in jvmti_open()
/Linux-v5.4/fs/xfs/
Dxfs_stats.c60 len += snprintf(buf + len, PATH_MAX - len, "%s", in xfs_stats_format()
64 len += snprintf(buf + len, PATH_MAX - len, " %u", in xfs_stats_format()
66 len += snprintf(buf + len, PATH_MAX - len, "\n"); in xfs_stats_format()
75 len += snprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", in xfs_stats_format()
77 len += snprintf(buf + len, PATH_MAX-len, "debug %u\n", in xfs_stats_format()
/Linux-v5.4/tools/perf/
Dbuiltin-buildid-cache.c35 char root_dir[PATH_MAX]; in build_id_cache__kcore_buildid()
54 char from[PATH_MAX]; in same_kallsyms_reloc()
55 char to[PATH_MAX]; in same_kallsyms_reloc()
81 char from[PATH_MAX]; in build_id_cache__kcore_existing()
82 char to[PATH_MAX]; in build_id_cache__kcore_existing()
83 char to_subdir[PATH_MAX]; in build_id_cache__kcore_existing()
120 char from_dir[PATH_MAX], to_dir[PATH_MAX]; in build_id_cache__add_kcore()
276 char filename[PATH_MAX]; in dso__missing_buildid_cache()
/Linux-v5.4/tools/cgroup/
Dcgroup_event_listener.c27 char event_control_path[PATH_MAX]; in main()
38 ret = snprintf(event_control_path, PATH_MAX, "%s/cgroup.event_control", in main()
40 if (ret >= PATH_MAX) in main()
/Linux-v5.4/tools/testing/selftests/powerpc/ptrace/
Dcore-pkey.c291 filename[0] = filenames = malloc(PATH_MAX); in parent()
297 ret = snprintf(filename[0], PATH_MAX, "core-pkey.%d", pid); in parent()
298 if (ret < 0 || ret >= PATH_MAX) { in parent()
304 ret = snprintf(filename[1], PATH_MAX - ret - 1, "core.%d", pid); in parent()
305 if (ret < 0 || ret >= PATH_MAX - ret - 1) { in parent()
373 core_pattern = malloc(PATH_MAX); in setup_core_pattern()
386 ret = fread(core_pattern, 1, PATH_MAX, f); in setup_core_pattern()
/Linux-v5.4/tools/testing/selftests/powerpc/
Dutils.c133 char path[PATH_MAX]; in read_debugfs_file()
137 strncat(path, debugfs_file, PATH_MAX - strlen(path) - 1); in read_debugfs_file()
155 char path[PATH_MAX]; in write_debugfs_file()
159 strncat(path, debugfs_file, PATH_MAX - strlen(path) - 1); in write_debugfs_file()
/Linux-v5.4/tools/bpf/bpftool/
Dtracelog.c48 if (src_len + 1 >= PATH_MAX) { in find_tracefs_mnt_single()
82 PATH_MAX - strlen(pipe_name) - 1); in get_tracefs_pipe()
130 char trace_pipe[PATH_MAX]; in do_tracelog()
/Linux-v5.4/tools/perf/arch/s390/util/
Dmachine.c14 char path[PATH_MAX]; in arch__fix_module_text_start()
16 snprintf(path, PATH_MAX, "module/%.*s/sections/.text", in arch__fix_module_text_start()
/Linux-v5.4/tools/perf/arch/arm/util/
Dcs-etm.c66 char path[PATH_MAX]; in cs_etm_set_context_id()
77 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_set_context_id()
115 char path[PATH_MAX]; in cs_etm_set_timestamp()
126 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_set_timestamp()
217 char msg[BUFSIZ], path[PATH_MAX], *sink; in cs_etm_set_sink_attr()
230 snprintf(path, PATH_MAX, "sinks/%s", sink); in cs_etm_set_sink_attr()
534 char path[PATH_MAX]; in cs_etm_is_etmv4()
542 snprintf(path, PATH_MAX, "cpu%d/%s", in cs_etm_is_etmv4()
555 char pmu_path[PATH_MAX]; in cs_etm_get_ro()
560 snprintf(pmu_path, PATH_MAX, "cpu%d/%s", cpu, path); in cs_etm_get_ro()
/Linux-v5.4/tools/hv/
Dhv_vss_daemon.c69 buffer = malloc(PATH_MAX); in is_dev_loop()
75 snprintf(buffer, PATH_MAX, "%s/loop", blkname); in is_dev_loop()
84 snprintf(buffer, PATH_MAX, "%s/slaves", blkname); in is_dev_loop()
98 snprintf(buffer, PATH_MAX, "%s/slaves/%s", blkname, in is_dev_loop()

1234567