Home
last modified time | relevance | path

Searched refs:d_name (Results 1 – 25 of 74) sorted by relevance

123

/tools/testing/selftests/proc/
A Dread.c83 assert(streq(de->d_name, ".")); in f()
87 assert(streq(de->d_name, "..")); in f()
90 assert(!streq(de->d_name, ".")); in f()
91 assert(!streq(de->d_name, "..")); in f()
98 if (level == 0 && streq(de->d_name, "sysrq-trigger")) { in f()
99 f_reg_write(d, de->d_name, "h", 1); in f()
101 f_reg_write(d, de->d_name, "1", 1); in f()
103 f_reg_write(d, de->d_name, "1", 1); in f()
105 f_reg(d, de->d_name); in f()
109 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY); in f()
[all …]
A Dproc-subset-pid.c88 if (streq(de->d_name, ".")) { in main()
92 } else if (streq(de->d_name, "..")) { in main()
96 } else if (streq(de->d_name, "self")) { in main()
100 } else if (streq(de->d_name, "thread-self")) { in main()
105 if (!string_is_pid(de->d_name)) { in main()
106 fprintf(stderr, "d_name '%s'\n", de->d_name); in main()
A Dfd-001-lookup.c117 assert(streq(de->d_name, ".")); in main()
121 assert(streq(de->d_name, "..")); in main()
131 fd_ull = xstrtoull(de->d_name, &end); in main()
/tools/perf/util/
A Dtracepoint.h14 (strcmp(evt_dirent->d_name, ".")) && \
15 (strcmp(evt_dirent->d_name, "..")) && \
21 (strcmp(sys_dirent->d_name, ".")) && \
22 (strcmp(sys_dirent->d_name, "..")))
A Dtp_pmu.c50 if (!strcmp(evt_ent->d_name, ".") in tp_pmu__for_each_tp_event()
51 || !strcmp(evt_ent->d_name, "..") in tp_pmu__for_each_tp_event()
52 || !strcmp(evt_ent->d_name, "enable") in tp_pmu__for_each_tp_event()
53 || !strcmp(evt_ent->d_name, "filter")) in tp_pmu__for_each_tp_event()
56 ret = cb(state, sys, evt_ent->d_name); in tp_pmu__for_each_tp_event()
83 if (!strcmp(events_ent->d_name, ".") || in tp_pmu__for_each_tp_sys()
84 !strcmp(events_ent->d_name, "..") || in tp_pmu__for_each_tp_sys()
85 !strcmp(events_ent->d_name, "enable") || in tp_pmu__for_each_tp_sys()
86 !strcmp(events_ent->d_name, "header_event") || in tp_pmu__for_each_tp_sys()
87 !strcmp(events_ent->d_name, "header_page")) in tp_pmu__for_each_tp_sys()
[all …]
A Dtrace-event-info.c158 (strcmp(dent->d_name, ".")) && \
159 (strcmp(dent->d_name, ".."))) \
178 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system()
200 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system()
278 if (strcmp(dent->d_name, "ftrace") == 0 || in record_event_files()
279 !system_in_tp_list(dent->d_name, tps)) in record_event_files()
293 if (strcmp(dent->d_name, "ftrace") == 0 || in record_event_files()
294 !system_in_tp_list(dent->d_name, tps)) in record_event_files()
303 ssize_t size = strlen(dent->d_name) + 1; in record_event_files()
420 dir_path = get_events_file(sys_dirent->d_name); in tracepoint_id_to_path()
[all …]
A Dutil.c181 if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) in rm_rf_depth_pat()
184 if (!match_pat(d->d_name, pat)) { in rm_rf_depth_pat()
190 path, d->d_name); in rm_rf_depth_pat()
235 return match_pat(d->d_name, pat); in kcore_dir_filter()
281 return d->d_name[0] != '.'; in lsdir_no_dot_filter()
304 strlist__add(list, d->d_name); in lsdir()
/tools/iio/
A Dlsiio.c50 if (check_prefix(ent->d_name, "in_") && in dump_channels()
51 (check_postfix(ent->d_name, "_raw") || in dump_channels()
52 check_postfix(ent->d_name, "_input"))) in dump_channels()
53 printf(" %-10s\n", ent->d_name); in dump_channels()
114 if (check_prefix(ent->d_name, type_device)) { in dump_devices()
118 ent->d_name) < 0) { in dump_devices()
136 if (check_prefix(ent->d_name, type_trigger)) { in dump_devices()
140 ent->d_name) < 0) { in dump_devices()
A Diio_utils.c123 if ((strcmp(builtname, ent->d_name) == 0) || in iioutils_get_type()
126 "%s/%s", scan_el_dir, ent->d_name); in iioutils_get_type()
181 if (strcmp(builtname, ent->d_name) == 0) in iioutils_get_type()
251 "%s/%s", device_dir, ent->d_name); in iioutils_get_param_float()
339 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
381 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
423 current->name = strndup(ent->d_name, in build_channel_array()
424 strlen(ent->d_name) - in build_channel_array()
577 if (strcmp(ent->d_name, ".") != 0 && in find_type_by_name()
578 strcmp(ent->d_name, "..") != 0 && in find_type_by_name()
[all …]
/tools/perf/ui/browsers/
A Dscripts.c198 !is_directory_at(scripts_dir_fd, lang_dirent->d_name))) in find_scripts()
200 if (!strcmp(lang_dirent->d_name, ".") || !strcmp(lang_dirent->d_name, "..")) in find_scripts()
204 if (strstr(lang_dirent->d_name, "perl")) in find_scripts()
208 if (strstr(lang_dirent->d_name, "python")) in find_scripts()
224 is_directory_at(lang_dir_fd, script_dirent->d_name)) in find_scripts()
227 if (strstr(script_dirent->d_name, "top.")) in find_scripts()
233 lang_dirent->d_name, in find_scripts()
234 script_dirent->d_name); in find_scripts()
235 temp = strchr(script_dirent->d_name, '.'); in find_scripts()
237 (temp - script_dirent->d_name) + 1, in find_scripts()
[all …]
/tools/power/acpi/os_specific/service_layers/
A Dosunixdir.c101 (external_info->wildcard_spec, dir_entry->d_name, 0)) { in acpi_os_get_next_filename()
102 if (dir_entry->d_name[0] == '.') { in acpi_os_get_next_filename()
106 str_len = strlen(dir_entry->d_name) + in acpi_os_get_next_filename()
118 strcat(temp_str, dir_entry->d_name); in acpi_os_get_next_filename()
141 dir_entry->d_name); in acpi_os_get_next_filename()
/tools/thermal/tmon/
A Dsysfs.c172 if (strstr(d_name, "trip_point") && in find_tzone_tp()
173 strstr(d_name, "temp")) { in find_tzone_tp()
177 sysfs_get_ulong(tz_name, d_name, &temp_ulong); in find_tzone_tp()
181 tp_id = get_instance_id(d_name, 2, 0); in find_tzone_tp()
183 tz_name, tp_id, temp_ulong, d_name); in find_tzone_tp()
186 d_name); in find_tzone_tp()
218 tz_name, nl->d_name); in find_tzone_cdev()
232 "%s%s", nl->d_name, "_trip_point"); in find_tzone_cdev()
402 if (strstr(namelist[n]->d_name, CDEV)) { in probe_thermal_sysfs()
412 namelist[n]->d_name, in probe_thermal_sysfs()
[all …]
/tools/include/nolibc/
A Ddirent.h22 char d_name[NAME_MAX + 1]; member
95 strlcpy(entry->d_name, ldir->d_name, sizeof(entry->d_name)); in readdir_r()
/tools/testing/selftests/powerpc/dscr/
A Ddscr_sysfs_test.c47 if (!strcmp(dp->d_name, "cpuidle")) in check_all_cpu_dscr_defaults()
49 if (!strstr(dp->d_name, "cpu")) in check_all_cpu_dscr_defaults()
52 len = snprintf(file, LEN_MAX, "%s%s/dscr", CPU_PATH, dp->d_name); in check_all_cpu_dscr_defaults()
/tools/testing/selftests/dmabuf-heaps/
A Ddmabuf-heap.c400 if (!strncmp(dir->d_name, ".", 2)) in numer_of_heaps()
402 if (!strncmp(dir->d_name, "..", 3)) in numer_of_heaps()
426 if (!strncmp(dir->d_name, ".", 2)) in main()
428 if (!strncmp(dir->d_name, "..", 3)) in main()
431 ksft_print_msg("Testing heap: %s\n", dir->d_name); in main()
433 test_alloc_and_import(dir->d_name); in main()
434 test_alloc_zeroed(dir->d_name, 4 * 1024); in main()
435 test_alloc_zeroed(dir->d_name, ONE_MEG); in main()
436 test_alloc_compat(dir->d_name); in main()
437 test_alloc_errors(dir->d_name); in main()
/tools/perf/tests/
A Dtests-scripts.c241 if (ent->d_name[0] == '.') in append_scripts_in_dir()
243 if (is_test_script(dir_fd, ent->d_name)) { /* It's a test */ in append_scripts_in_dir()
244 char *desc = shell_test__description(dir_fd, ent->d_name); in append_scripts_in_dir()
247 append_script(dir_fd, ent->d_name, desc, result, result_sz); in append_scripts_in_dir()
255 fstatat(dir_fd, ent->d_name, &st, 0); in append_scripts_in_dir()
259 if (strncmp(ent->d_name, "base_", 5) == 0) in append_scripts_in_dir()
261 fd = openat(dir_fd, ent->d_name, O_PATH); in append_scripts_in_dir()
A Dpmu.c320 if (!strcmp(pmu_dent->d_name, ".") || in test__pmu_event_names()
321 !strcmp(pmu_dent->d_name, "..")) in test__pmu_event_names()
325 sysfs, pmu_dent->d_name); in test__pmu_event_names()
333 sysfs, pmu_dent->d_name); in test__pmu_event_names()
341 const char *event_name = event_dent->d_name; in test__pmu_event_names()
348 pmu_dent->d_name, event_name); in test__pmu_event_names()
/tools/testing/selftests/powerpc/papr_attributes/
A Dattr_test.c80 if (strcmp(entry->d_name, ".") == 0 || in verify_energy_info()
81 strcmp(entry->d_name, "..") == 0) in verify_energy_info()
84 id = atoi(entry->d_name); in verify_energy_info()
/tools/power/cpupower/lib/
A Dpowercap.c221 if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0) in powercap_read_zone()
224 if (stat(dent->d_name, &st) != 0 || !S_ISDIR(st.st_mode)) in powercap_read_zone()
225 if (fstatat(dirfd(zone_dir), dent->d_name, &st, 0) < 0) in powercap_read_zone()
228 if (strncmp(dent->d_name, "intel-rapl:", 11) != 0) in powercap_read_zone()
248 strcat(child_zone->sys_name, dent->d_name); in powercap_read_zone()
/tools/tracing/rtla/src/
A Dutils.c277 if (*proc_entry->d_name == '.') in procfs_is_workload_pid()
281 for (t_name = proc_entry->d_name; t_name; t_name++) { in procfs_is_workload_pid()
289 snprintf(buffer, MAX_PATH, "/proc/%s/comm", proc_entry->d_name); in procfs_is_workload_pid()
307 debug_msg("Found workload pid:%s comm:%s", proc_entry->d_name, buffer); in procfs_is_workload_pid()
345 retval = __set_sched_attr(atoi(proc_entry->d_name), attr); in set_comm_sched_attr()
347 err_msg("Error setting sched attributes for pid:%s\n", proc_entry->d_name); in set_comm_sched_attr()
351 debug_msg("Set sched attributes for pid:%s\n", proc_entry->d_name); in set_comm_sched_attr()
892 retval = write(cg_fd, proc_entry->d_name, strlen(proc_entry->d_name)); in set_comm_cgroup()
895 proc_entry->d_name, strerror(errno)); in set_comm_cgroup()
899 debug_msg("Set cgroup attributes for pid:%s\n", proc_entry->d_name); in set_comm_cgroup()
/tools/perf/arch/arm/util/
A Dauxtrace.c74 if (strstr(dent->d_name, HISI_PTT_PMU_NAME)) in find_all_hisi_ptt_pmus()
90 if (strstr(dent->d_name, HISI_PTT_PMU_NAME) && idx < *nr_ptts) { in find_all_hisi_ptt_pmus()
91 hisi_ptt_pmus[idx] = perf_pmus__find(dent->d_name); in find_all_hisi_ptt_pmus()
/tools/lib/api/
A Dio_dir.h49 char d_name[NAME_MAX + 1]; /* Filename (null-terminated) */ member
94 if (fstatat(iod->dirfd, dent->d_name, &st, /*flags=*/0)) in io_dir__is_dir()
/tools/testing/selftests/hid/
A Dhid_common.h324 if (fnmatch(target, dir->d_name, 0)) in match_sysfs_device()
328 sprintf(uevent, "%s/%s/uevent", workdir, dir->d_name); in match_sysfs_device()
363 str_id = dir->d_name + sizeof("0000:0000:0000."); in get_hid_id()
397 sprintf(sysfs, "%s/%s/hidraw", workdir, dir->d_name); in get_hidraw()
404 if (fnmatch("hidraw*", subdir->d_name, 0)) in get_hidraw()
407 found = atoi(subdir->d_name + strlen("hidraw")); in get_hidraw()
/tools/lib/subcmd/
A Dhelp.c201 if (!strstarts(de->d_name, prefix)) in list_commands_in_dir()
204 astrcat(&buf, de->d_name); in list_commands_in_dir()
208 entlen = strlen(de->d_name) - prefix_len; in list_commands_in_dir()
209 if (has_extension(de->d_name, ".exe")) in list_commands_in_dir()
212 add_cmdname(cmds, de->d_name + prefix_len, entlen); in list_commands_in_dir()
/tools/bpf/bpftool/
A Dperf.c168 pch = proc_de->d_name; in show_proc()
178 err = snprintf(buf, sizeof(buf), "/proc/%s/fd", proc_de->d_name); in show_proc()
188 pch = pid_fd_de->d_name; in show_proc()

Completed in 30 milliseconds

123