Home
last modified time | relevance | path

Searched refs:ent (Results 1 – 20 of 20) sorted by relevance

/tools/iio/
Dlsiio.c43 const struct dirent *ent; in dump_channels() local
49 while (ent = readdir(dp), ent) in dump_channels()
50 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()
103 const struct dirent *ent; in dump_devices() local
113 while (ent = readdir(dp), ent) { in dump_devices()
114 if (check_prefix(ent->d_name, type_device)) { in dump_devices()
118 ent->d_name) < 0) { in dump_devices()
[all …]
Diio_utils.c96 const struct dirent *ent; in iioutils_get_type() local
120 while (ent = readdir(dp), ent) in iioutils_get_type()
121 if ((strcmp(builtname, ent->d_name) == 0) || in iioutils_get_type()
122 (strcmp(builtname_generic, ent->d_name) == 0)) { in iioutils_get_type()
124 "%s/%s", scan_el_dir, ent->d_name); in iioutils_get_type()
179 if (strcmp(builtname, ent->d_name) == 0) in iioutils_get_type()
225 const struct dirent *ent; in iioutils_get_param_float() local
245 while (ent = readdir(dp), ent) in iioutils_get_param_float()
246 if ((strcmp(builtname, ent->d_name) == 0) || in iioutils_get_param_float()
247 (strcmp(builtname_generic, ent->d_name) == 0)) { in iioutils_get_param_float()
[all …]
Diio_generic_buffer.c203 const struct dirent *ent; in enable_disable_all_channels() local
220 while (ent = readdir(dp), ent) { in enable_disable_all_channels()
221 if (iioutils_check_suffix(ent->d_name, "_en")) { in enable_disable_all_channels()
224 ent->d_name); in enable_disable_all_channels()
225 ret = write_sysfs_int(ent->d_name, scanelemdir, in enable_disable_all_channels()
229 ent->d_name); in enable_disable_all_channels()
/tools/testing/selftests/vm/
Dtranshuge-stress.c25 #define PAGEMAP_PRESENT(ent) (((ent) & (1ull << 63)) != 0) argument
26 #define PAGEMAP_PFN(ent) ((ent) & ((1ull << 55) - 1)) argument
32 uint64_t ent[2]; in allocate_transhuge() local
46 if (pread(pagemap_fd, ent, sizeof(ent), in allocate_transhuge()
47 (uintptr_t)ptr >> (PAGE_SHIFT - 3)) != sizeof(ent)) in allocate_transhuge()
50 if (PAGEMAP_PRESENT(ent[0]) && PAGEMAP_PRESENT(ent[1]) && in allocate_transhuge()
51 PAGEMAP_PFN(ent[0]) + 1 == PAGEMAP_PFN(ent[1]) && in allocate_transhuge()
52 !(PAGEMAP_PFN(ent[0]) & ((1 << (HPAGE_SHIFT - PAGE_SHIFT)) - 1))) in allocate_transhuge()
53 return PAGEMAP_PFN(ent[0]); in allocate_transhuge()
/tools/perf/util/
Dgenelf_debug.c293 static ubyte get_special_opcode(struct debug_entry *ent, in get_special_opcode() argument
303 temp = (ent->lineno - last_line) - default_debug_line_header.line_base; in get_special_opcode()
311 delta_addr = (ent->addr - last_vma) / default_debug_line_header.minimum_instruction_length; in get_special_opcode()
328 struct debug_entry *ent, size_t nr_entry, in emit_lineno_info() argument
352 for (i = 0; i < nr_entry; i++, ent = debug_entry_next(ent)) { in emit_lineno_info()
359 if (!cur_filename || strcmp(cur_filename, ent->name)) { in emit_lineno_info()
360 emit_lne_define_filename(be, ent->name); in emit_lineno_info()
361 cur_filename = ent->name; in emit_lineno_info()
366 special_opcode = get_special_opcode(ent, last_line, last_vma); in emit_lineno_info()
368 last_line = ent->lineno; in emit_lineno_info()
[all …]
Djitdump.h126 debug_entry_next(struct debug_entry *ent) in debug_entry_next() argument
128 void *a = ent + 1; in debug_entry_next()
129 size_t l = strlen(ent->name) + 1; in debug_entry_next()
134 debug_entry_file(struct debug_entry *ent) in debug_entry_file() argument
136 void *a = ent + 1; in debug_entry_file()
Dprobe-file.c188 struct str_node *ent; in __probe_file__get_namelist() local
197 strlist__for_each_entry(ent, rawlist) { in __probe_file__get_namelist()
198 ret = parse_probe_trace_command(ent->s, &tev); in __probe_file__get_namelist()
251 static int __del_trace_probe_event(int fd, struct str_node *ent) in __del_trace_probe_event() argument
258 ret = e_snprintf(buf, 128, "-:%s", ent->s); in __del_trace_probe_event()
265 ent->s); in __del_trace_probe_event()
289 struct str_node *ent; in probe_file__get_events() local
300 strlist__for_each_entry(ent, namelist) { in probe_file__get_events()
301 p = strchr(ent->s, ':'); in probe_file__get_events()
303 strfilter__compare(filter, ent->s)) { in probe_file__get_events()
[all …]
Dauxtrace.c678 struct auxtrace_index_entry ent; in auxtrace_index__do_write() local
682 ent.file_offset = auxtrace_index->entries[i].file_offset; in auxtrace_index__do_write()
683 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write()
684 if (writen(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__do_write()
715 struct auxtrace_index_entry ent; in auxtrace_index__process_entry() local
718 if (readn(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__process_entry()
728 bswap_64(ent.file_offset); in auxtrace_index__process_entry()
729 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry()
731 auxtrace_index->entries[nr].file_offset = ent.file_offset; in auxtrace_index__process_entry()
732 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry()
[all …]
Dparse-events.c2370 struct probe_cache_entry *ent; in print_sdt_events() local
2392 list_for_each_entry(ent, &pcache->entries, node) { in print_sdt_events()
2393 if (!ent->sdt) in print_sdt_events()
2396 !strglobmatch(ent->pev.group, subsys_glob)) in print_sdt_events()
2399 !strglobmatch(ent->pev.event, event_glob)) in print_sdt_events()
2401 ret = asprintf(&buf, "%s:%s@%s", ent->pev.group, in print_sdt_events()
2402 ent->pev.event, nd->s); in print_sdt_events()
Dheader.c1207 struct dirent *ent; in memory_node__read() local
1211 while ((ent = readdir(dir))) \ in memory_node__read()
1212 if (strcmp(ent->d_name, ".") && \ in memory_node__read()
1213 strcmp(ent->d_name, "..") && \ in memory_node__read()
1214 sscanf(ent->d_name, "memory%u", &mem) == 1) in memory_node__read()
1262 struct dirent *ent; in build_mem_topology() local
1277 while (!ret && (ent = readdir(dir))) { in build_mem_topology()
1281 if (!strcmp(ent->d_name, ".") || in build_mem_topology()
1282 !strcmp(ent->d_name, "..")) in build_mem_topology()
1285 r = sscanf(ent->d_name, "node%u", &idx); in build_mem_topology()
Dmachine.c2258 u8 *cpumode, int ent) in find_prev_cpumode() argument
2262 while (--ent >= 0) { in find_prev_cpumode()
2263 u64 ip = chain->ips[ent]; in find_prev_cpumode()
Dprobe-event.c2530 struct str_node *ent; in __show_perf_probe_events() local
2539 strlist__for_each_entry(ent, rawlist) { in __show_perf_probe_events()
2540 ret = parse_probe_trace_command(ent->s, &tev); in __show_perf_probe_events()
/tools/hv/
Dhv_vss_daemon.c115 struct mntent *ent; in vss_operate() local
137 while ((ent = getmntent(mounts))) { in vss_operate()
138 if (strncmp(ent->mnt_fsname, match, strlen(match))) in vss_operate()
140 if (stat(ent->mnt_fsname, &sb)) { in vss_operate()
142 ent->mnt_fsname, errno, strerror(errno)); in vss_operate()
149 if (hasmntopt(ent, MNTOPT_RO) != NULL) in vss_operate()
151 if (strcmp(ent->mnt_type, "vfat") == 0) in vss_operate()
153 if (strcmp(ent->mnt_dir, "/") == 0) { in vss_operate()
157 error |= vss_do_freeze(ent->mnt_dir, cmd); in vss_operate()
173 if (ent) { in vss_operate()
[all …]
/tools/gpio/
Dlsgpio.c165 const struct dirent *ent; in main() local
176 while (ent = readdir(dp), ent) { in main()
177 if (check_prefix(ent->d_name, "gpiochip")) { in main()
178 ret = list_device(ent->d_name); in main()
/tools/perf/tests/
Dbuiltin-test.c447 #define for_each_shell_test(dir, base, ent) \ argument
448 while ((ent = readdir(dir)) != NULL) \
449 if (!is_directory(base, ent) && ent->d_name[0] != '.')
476 struct dirent *ent; in shell_tests__max_desc_width() local
488 for_each_shell_test(dir, path, ent) { in shell_tests__max_desc_width()
490 const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); in shell_tests__max_desc_width()
527 struct dirent *ent; in run_shell_tests() local
540 for_each_shell_test(dir, st.dir, ent) { in run_shell_tests()
544 .desc = shell_test__description(desc, sizeof(desc), st.dir, ent->d_name), in run_shell_tests()
552 st.file = ent->d_name; in run_shell_tests()
[all …]
Dparse-events.c1872 struct dirent *ent; in test_pmu_events() local
1891 while (!ret && (ent = readdir(dir))) { in test_pmu_events()
1896 if (strchr(ent->d_name, '.')) in test_pmu_events()
1899 snprintf(name, sizeof(name), "cpu/event=%s/u", ent->d_name); in test_pmu_events()
1907 snprintf(name, sizeof(name), "%s:u,cpu/event=%s/u", ent->d_name, ent->d_name); in test_pmu_events()
/tools/testing/selftests/gpio/
Dgpio-mockup-chardev.c131 const struct dirent *ent; in list_gpiochip() local
150 while (ent = readdir(dp), ent) { in list_gpiochip()
151 if (check_prefix(ent->d_name, "gpiochip")) { in list_gpiochip()
152 *ret = asprintf(&chrdev_name, "/dev/%s", ent->d_name); in list_gpiochip()
/tools/lib/subcmd/
Dhelp.c18 struct cmdname *ent = malloc(sizeof(*ent) + len + 1); in add_cmdname() local
20 ent->len = len; in add_cmdname()
21 memcpy(ent->name, name, len); in add_cmdname()
22 ent->name[len] = 0; in add_cmdname()
25 cmds->names[cmds->cnt++] = ent; in add_cmdname()
/tools/perf/
Dbuiltin-inject.c474 struct event_entry *ent; in perf_inject__sched_process_exit() local
476 list_for_each_entry(ent, &inject->samples, node) { in perf_inject__sched_process_exit()
477 if (sample->tid == ent->tid) { in perf_inject__sched_process_exit()
478 list_del_init(&ent->node); in perf_inject__sched_process_exit()
479 free(ent); in perf_inject__sched_process_exit()
494 struct event_entry *ent; in perf_inject__sched_switch() local
498 ent = malloc(event->header.size + sizeof(struct event_entry)); in perf_inject__sched_switch()
499 if (ent == NULL) { in perf_inject__sched_switch()
505 ent->tid = sample->tid; in perf_inject__sched_switch()
506 memcpy(&ent->event, event, event->header.size); in perf_inject__sched_switch()
[all …]
Dbuiltin-probe.c422 struct str_node *ent; in perf_del_probe_events() local
446 strlist__for_each_entry(ent, klist) in perf_del_probe_events()
447 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()
456 strlist__for_each_entry(ent, ulist) in perf_del_probe_events()
457 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()