Home
last modified time | relevance | path

Searched refs:snprintf (Results 1 – 25 of 352) sorted by relevance

12345678910>>...15

/tools/power/x86/intel-speed-select/
A Disst-display.c15 snprintf(str, str_len, "none"); in printcpulist()
25 index = snprintf(&str[curr_index], in printcpulist()
150 k += snprintf(&delimiters[k], in format_and_print()
177 snprintf(header, sizeof(header), in print_package_info()
181 snprintf(header, sizeof(header), in print_package_info()
185 snprintf(header, sizeof(header), in print_package_info()
308 snprintf(header, sizeof(header), in _isst_fact_display_information()
318 snprintf(header, sizeof(header), in _isst_fact_display_information()
497 snprintf(header, sizeof(header), in isst_ctdp_display_information()
508 snprintf(header, sizeof(header), in isst_ctdp_display_information()
[all …]
/tools/lib/api/fs/
A Dtracing_path.c20 snprintf(tracing_path, sizeof(tracing_path), "%s/%s", in __tracing_path_set()
133 snprintf(filename, PATH_MAX, "%s/%s", sys, name ?: "*"); in tracing_path__strerror_open_tp()
146 snprintf(buf, size, in tracing_path__strerror_open_tp()
152 snprintf(buf, size, in tracing_path__strerror_open_tp()
159 snprintf(buf, size, "%s", in tracing_path__strerror_open_tp()
166 snprintf(buf, size, in tracing_path__strerror_open_tp()
173 snprintf(buf, size, "%s", str_error_r(err, sbuf, sizeof(sbuf))); in tracing_path__strerror_open_tp()
A Dfs.c264 snprintf(upper_name, name_len, "PERF_%s_ENVIRONMENT", fs->name); in mount_overload()
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()
491 snprintf(path, sizeof(path), "%s/sys/%s", procfs, sysctl); in sysctl__read_int()
504 if (snprintf(path, sizeof(path), "%s/%s", sysfs, entry) >= PATH_MAX) in sysfs__write_int()
/tools/power/cpupower/utils/helpers/
A Dmisc.c61 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/power/energy_perf_bias", cpu); in cpupower_intel_get_perf_bias()
81 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/power/energy_perf_bias", cpu); in cpupower_intel_set_perf_bias()
82 snprintf(linebuf, sizeof(linebuf), "%d", val); in cpupower_intel_set_perf_bias()
95 snprintf(path, sizeof(path), in cpupower_set_epp()
101 snprintf(linebuf, sizeof(linebuf), "%s", epp); in cpupower_set_epp()
114 snprintf(path, sizeof(path), PATH_TO_CPU "amd_pstate/status"); in cpupower_set_amd_pstate_mode()
119 snprintf(linebuf, sizeof(linebuf), "%s\n", mode); in cpupower_set_amd_pstate_mode()
132 snprintf(path, sizeof(path), PATH_TO_CPU "cpufreq/boost"); in cpupower_set_turbo_boost()
137 snprintf(linebuf, sizeof(linebuf), "%d", turbo_boost); in cpupower_set_turbo_boost()
A Dsysfs.c57 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()
111 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in sysfs_idlestate_file_exists()
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()
312 snprintf(value, SYSFS_PATH_MAX, "%u", disable); in sysfs_idlestate_disable()
361 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpuidle"); in sysfs_get_idlestate_count()
365 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpu%u/cpuidle/state0", cpu); in sysfs_get_idlestate_count()
370 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU in sysfs_get_idlestate_count()
389 snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname); in sysfs_cpuidle_read_file()
/tools/testing/selftests/proc/
A Dfd-001-lookup.c60 snprintf(buf, sizeof(buf), "/proc/self/fd/%u", fd); in test_lookup()
67 snprintf(buf, sizeof(buf), "/proc/self/fd/%c%u", c, fd); in test_lookup()
75 snprintf(buf, sizeof(buf), "/proc/self/fd/%u%c", fd, c); in test_lookup()
80 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", i); in test_lookup()
84 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", i); in test_lookup()
88 snprintf(buf, sizeof(buf), "/proc/self/fd/%u", u); in test_lookup()
92 snprintf(buf, sizeof(buf), "/proc/self/fd/%u", u); in test_lookup()
A Dfd-003-kthread.c47 snprintf(buf, sizeof(buf), "/proc/%u", pid); in kernel_thread_fd()
138 snprintf(buf, sizeof(buf), "%d", i); in test_lookup()
142 snprintf(buf, sizeof(buf), "%d", i); in test_lookup()
146 snprintf(buf, sizeof(buf), "%u", u); in test_lookup()
150 snprintf(buf, sizeof(buf), "%u", u); in test_lookup()
A Dproc-multiple-procfs.c36 snprintf(procbuff, sizeof(procbuff), "%s/meminfo", procdir1); in main()
39 snprintf(procbuff, sizeof(procbuff), "%s/meminfo", procdir2); in main()
A Dproc-pid-vm.c207 snprintf(buf, sizeof(buf), "/proc/self/fd/%u", fd); in make_exe()
345 int len = snprintf(buf0, sizeof(buf0), in main()
351 snprintf(buf0 + MAPS_OFFSET, sizeof(buf0) - MAPS_OFFSET, in main()
361 snprintf(buf, sizeof(buf), "/proc/%u/maps", pid); in main()
380 snprintf(buf, sizeof(buf), "/proc/%u/smaps", pid); in main()
425 len = snprintf(bufr, sizeof(bufr), in main()
429 snprintf(bufr + MAPS_OFFSET, sizeof(bufr) - MAPS_OFFSET, in main()
436 snprintf(buf, sizeof(buf), "/proc/%u/smaps_rollup", pid); in main()
472 snprintf(buf, sizeof(buf), "/proc/%u/statm", pid); in main()
502 snprintf(path_buf, sizeof(path_buf), "/proc/%u/maps", pid); in main()
[all …]
/tools/usb/usbip/src/
A Dutils.c23 snprintf(match_busid_attr_path, sizeof(match_busid_attr_path), in modify_match_busid()
29 cmd_size = snprintf(command, SYSFS_BUS_ID_SIZE + 4, "add %s", in modify_match_busid()
32 cmd_size = snprintf(command, SYSFS_BUS_ID_SIZE + 4, "del %s", in modify_match_busid()
/tools/perf/util/intel-pt-decoder/
A Dintel-pt-pkt-decoder.c692 return snprintf(buf, buf_len, "%s", name); in intel_pt_pkt_desc()
696 ret = snprintf(buf, blen, "%s ", name); in intel_pt_pkt_desc()
703 ret = snprintf(buf, blen, "T"); in intel_pt_pkt_desc()
705 ret = snprintf(buf, blen, "N"); in intel_pt_pkt_desc()
712 ret = snprintf(buf, blen, " (%d)", packet->count); in intel_pt_pkt_desc()
723 return snprintf(buf, buf_len, "%s no ip", name); in intel_pt_pkt_desc()
736 return snprintf(buf, buf_len, "%s IF:%d %lld", in intel_pt_pkt_desc()
745 ret = snprintf(buf, buf_len, "%s 0x%llx (NR=%d)", in intel_pt_pkt_desc()
754 return snprintf(buf, buf_len, "%s IP:0", name); in intel_pt_pkt_desc()
757 return snprintf(buf, buf_len, "%s IP:1", name); in intel_pt_pkt_desc()
[all …]
/tools/perf/util/
A Damd-sample-raw.c61 snprintf(l3_miss_str, sizeof(l3_miss_str), in pr_ibs_fetch_ctl()
89 snprintf(ldlat, sizeof(ldlat), " LdLatThrsh %2d LdLatEn %d", in pr_ibs_op_ctl()
185 snprintf(l2_miss_str, sizeof(l2_miss_str), " L2Miss %d", reg.l2_miss); in pr_ibs_op_data3()
186 snprintf(op_dc_miss_open_mem_reqs_str, sizeof(op_dc_miss_open_mem_reqs_str), in pr_ibs_op_data3()
191 snprintf(op_mem_width_str, sizeof(op_mem_width_str), in pr_ibs_op_data3()
198 snprintf(dc_l1_l2tlb_miss_str, sizeof(dc_l1_l2tlb_miss_str), in pr_ibs_op_data3()
201 snprintf(dc_page_size_str, sizeof(dc_page_size_str), in pr_ibs_op_data3()
205 snprintf(dc_l1_l2tlb_miss_str, sizeof(dc_l1_l2tlb_miss_str), in pr_ibs_op_data3()
208 snprintf(dc_l1tlb_hit_str, sizeof(dc_l1tlb_hit_str), in pr_ibs_op_data3()
211 snprintf(dc_l2tlb_hit_2m_str, sizeof(dc_l2tlb_hit_2m_str), in pr_ibs_op_data3()
[all …]
A Dperf_event_attr_fprintf.c173 snprintf(buf, size, "%"PRIu64, value); in print_id_unsigned()
175 snprintf(buf, size, "%"PRIu64" (%s)", value, s); in print_id_unsigned()
181 snprintf(buf, size, "%#"PRIx64, value); in print_id_hex()
183 snprintf(buf, size, "%#"PRIx64" (%s)", value, s); in print_id_hex()
197 snprintf(buf, size, "%#"PRIx64, config); in __p_config_hw_id()
204 snprintf(buf, size, "%#"PRIx64" (%s)", config, name); in __p_config_hw_id()
206 snprintf(buf, size, "%#"PRIx64" (%s/%s/)", config, pmu->name, name); in __p_config_hw_id()
225 snprintf(buf, size, "%#"PRIx64, config); in __p_config_hw_cache_id()
232 snprintf(buf, size, "%#"PRIx64" (%s | %s | %s)", config, in __p_config_hw_cache_id()
269 #define p_hex(val) snprintf(buf, BUF_SIZE, "%#"PRIx64, (uint64_t)(val))
[all …]
/tools/power/cpupower/lib/
A Dcpuidle.c37 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in cpuidle_state_file_exists()
60 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in cpuidle_state_read_file()
95 snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpuidle/state%u/%s", in cpuidle_state_write_file()
244 snprintf(value, SYSFS_PATH_MAX, "%u", disable); in cpuidle_state_disable()
299 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpuidle"); in cpuidle_state_count()
303 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpu%u/cpuidle/state0", cpu); in cpuidle_state_count()
308 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU in cpuidle_state_count()
327 snprintf(path, sizeof(path), PATH_TO_CPU "cpuidle/%s", fname); in sysfs_cpuidle_read_file()
/tools/testing/selftests/pidfd/
A Dpidfd_xattr_test.c57 snprintf(xattr_name, sizeof(xattr_name), "trusted.testattr%d", i); in TEST_F()
58 snprintf(xattr_value, sizeof(xattr_value), "testvalue%d", i); in TEST_F()
64 snprintf(xattr_name, sizeof(xattr_name), "trusted.testattr%d", i); in TEST_F()
65 snprintf(xattr_value, sizeof(xattr_value), "testvalue%d", i); in TEST_F()
75 snprintf(xattr_name, sizeof(xattr_name), "trusted.testattr%d", i); in TEST_F()
87 snprintf(xattr_name, sizeof(xattr_name), "trusted.testattr%d", i); in TEST_F()
/tools/testing/selftests/alsa/
A Dpcm-test.c353 snprintf(msg, sizeof(msg), "Failed to get pcm handle: %s", snd_strerror(err)); in test_pcm_time()
359 snprintf(msg, sizeof(msg), "snd_pcm_hw_params_any: %s", snd_strerror(err)); in test_pcm_time()
369 snprintf(msg, sizeof(msg), "snd_pcm_hw_params_set_access %s: %s", in test_pcm_time()
397 snprintf(msg, sizeof(msg), "snd_pcm_hw_params_set_format %s: %s", in test_pcm_time()
413 snprintf(msg, sizeof(msg), "rate mismatch %ld != %u", rate, rrate); in test_pcm_time()
430 snprintf(msg, sizeof(msg), "snd_pcm_hw_params: %s", snd_strerror(err)); in test_pcm_time()
456 snprintf(msg, sizeof(msg), "snd_pcm_sw_params: %s", snd_strerror(err)); in test_pcm_time()
478 snprintf(msg, sizeof(msg), in test_pcm_time()
483 snprintf(msg, sizeof(msg), in test_pcm_time()
490 snprintf(msg, sizeof(msg), in test_pcm_time()
[all …]
/tools/testing/selftests/mm/
A Dthp_settings.c120 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in thp_read_string()
163 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in thp_write_string()
180 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in thp_read_num()
193 ret = snprintf(path, PATH_MAX, THP_SYSFS "%s", name); in thp_write_num()
234 snprintf(path, PATH_MAX, "hugepages-%ukB/enabled", in thp_read_settings()
245 snprintf(path, PATH_MAX, "hugepages-%ukB/shmem_enabled", in thp_read_settings()
283 snprintf(path, PATH_MAX, "hugepages-%ukB/enabled", in thp_write_settings()
292 snprintf(path, PATH_MAX, "hugepages-%ukB/shmem_enabled", in thp_write_settings()
360 ret = snprintf(path, PATH_MAX, THP_SYSFS "hugepages-%ukB/%s", in __thp_supported_orders()
/tools/testing/selftests/filesystems/binderfs/
A Dbinderfs_test.c90 snprintf(device_path, sizeof(device_path), "%s/binder-control", binderfs_mntpt); in __do_binderfs_test()
113 snprintf(device_path, sizeof(device_path), "%s/my-binder", binderfs_mntpt); in __do_binderfs_test()
159 snprintf(device_path, sizeof(device_path), "%s/features/%s", in __do_binderfs_test()
256 snprintf(path, sizeof(path), "/proc/%d/setgroups", pid); in write_id_mapping()
271 ret = snprintf(path, sizeof(path), "/proc/%d/uid_map", pid); in write_id_mapping()
274 ret = snprintf(path, sizeof(path), "/proc/%d/gid_map", pid); in write_id_mapping()
337 snprintf(id_map, sizeof(id_map), "0 %d 1\n", getuid()); in change_idmaps()
343 snprintf(id_map, sizeof(id_map), "0 %d 1\n", getgid()); in change_idmaps()
422 snprintf(device_path, sizeof(device_path), in TEST()
431 snprintf(device.name, sizeof(device.name), "%d", i); in TEST()
[all …]
/tools/lib/bpf/
A Dstr_error.c32 snprintf(dst, len, "unknown error (%d)", err < 0 ? err : -err); in libbpf_strerror_r()
34 snprintf(dst, len, "ERROR: strerror_r(%d)=%d", err, ret); in libbpf_strerror_r()
101 snprintf(buf, sizeof(buf), "%d", err); in libbpf_errstr()
/tools/thermal/tmon/
A Dsysfs.c39 snprintf(filepath, sizeof(filepath), "%s/%s", path, filename); in sysfs_set_ulong()
63 snprintf(filepath, sizeof(filepath), "%s/%s", path, filename); in sysfs_get_ulong()
82 snprintf(filepath, sizeof(filepath), "%s/%s", path, filename); in sysfs_get_string()
217 snprintf(cdev_name, sizeof(cdev_name) - 2, "%s/%s", in find_tzone_cdev()
231 snprintf(cdev_trip_name, sizeof(cdev_trip_name) - 1, in find_tzone_cdev()
292 snprintf(tz_name, 256, "%s/%s%d", THERMAL_SYSFS, TZONE, i); in scan_tzones()
351 snprintf(cdev_name, 256, "%s/%s%d", THERMAL_SYSFS, CDEV, i); in scan_cdevs()
501 snprintf(tz_name, 256, "%s/%s%d", THERMAL_SYSFS, TZONE, in update_thermal_data()
514 snprintf(cdev_name, 256, "%s/%s%d", THERMAL_SYSFS, CDEV, in update_thermal_data()
552 snprintf(ctrl_cdev_path, 256, "%s/%s%d", THERMAL_SYSFS, in set_ctrl_state()
[all …]
/tools/testing/selftests/cgroup/lib/
A Dcgroup_util.c62 snprintf(ret, len, "%s/%s", root, name); in cg_name()
72 snprintf(ret, len, "%s/%s_%d", root, name, index); in cg_name_indexed()
82 snprintf(ret, len, "%s/%s", cgroup, control); in cg_control()
93 snprintf(path, sizeof(path), "%s/%s", cgroup, control); in cg_read()
193 snprintf(path, sizeof(path), "%s/%s", cgroup, control); in cg_write()
206 snprintf(path, sizeof(path), "%s/%s", cgroup, control); in cg_open()
355 snprintf(pidbuf, sizeof(pidbuf), "%d", pid); in cg_enter()
381 snprintf(buf, sizeof(buf), "%d", getpid()); in cg_run()
504 snprintf(buf, sizeof(buf), "%d", getpid()); in cg_run_nowait()
531 snprintf(path, sizeof(path), "/proc/%s/%s", in proc_read_text()
[all …]
/tools/testing/selftests/bpf/prog_tests/
A Dtest_local_storage.c118 snprintf(tmp_exec_path, sizeof(tmp_exec_path), "%s/copy_of_rm", in test_test_local_storage()
120 snprintf(cmd, sizeof(cmd), "cp /bin/rm %s", tmp_exec_path); in test_test_local_storage()
147 snprintf(cmd, sizeof(cmd), "mv %s/copy_of_rm %s/check_null_ptr", in test_test_local_storage()
165 snprintf(cmd, sizeof(cmd), "rm -rf %s", tmp_dir_path); in test_test_local_storage()
A Dcgroup_iter.c133 snprintf(expected_output, sizeof(expected_output), in test_walk_preorder()
144 snprintf(expected_output, sizeof(expected_output), in test_walk_postorder()
158 snprintf(expected_output, sizeof(expected_output), in test_walk_ancestors_up()
174 snprintf(expected_output, sizeof(expected_output), in test_early_termination()
186 snprintf(expected_output, sizeof(expected_output), in test_walk_self_only()
211 snprintf(expected_output, sizeof(expected_output), EPILOGUE); in test_walk_dead_self_only()
287 snprintf(expected_output, sizeof(expected_output), in test_walk_self_only_css_task()
/tools/testing/selftests/resctrl/
A Dresctrlfs.c374 snprintf(file_path, sizeof(file_path), "%s/%s/%s", INFO_PATH, resource, in resource_info_unsigned_get()
447 snprintf(cbm_path, sizeof(cbm_path), "%s/%s/cbm_mask", in get_full_cbm()
471 snprintf(mask_path, sizeof(mask_path), "%s/%s/shareable_bits", in get_shareable_mask()
718 schema_len = snprintf(schema, sizeof(schema), "%s:%d=%s\n", in write_schemata()
721 snprintf(reason, sizeof(reason), in write_schemata()
729 snprintf(reason, sizeof(reason), in write_schemata()
736 snprintf(reason, sizeof(reason), in write_schemata()
829 snprintf(res_path, sizeof(res_path), "%s/%s", INFO_PATH, resource); in resctrl_resource_exists()
854 snprintf(res_path, sizeof(res_path), "%s/%s/mon_features", INFO_PATH, resource); in resctrl_mon_feature_exists()
882 snprintf(res_path, sizeof(res_path), "%s/%s/%s", INFO_PATH, resource, in resource_info_file_exists()
[all …]
/tools/bpf/bpftool/
A Dxlated_dumper.c152 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_call_pcrel()
155 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_call_pcrel()
158 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_call_pcrel()
168 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_call_helper()
171 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_call_helper()
201 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_imm()
204 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_imm()
207 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_imm()
210 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_imm()
213 snprintf(dd->scratch_buff, sizeof(dd->scratch_buff), in print_imm()

Completed in 49 milliseconds

12345678910>>...15