Home
last modified time | relevance | path

Searched refs:ent (Results 1 – 24 of 24) 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.c213 const struct dirent *ent; in enable_disable_all_channels() local
230 while (ent = readdir(dp), ent) { in enable_disable_all_channels()
231 if (iioutils_check_suffix(ent->d_name, "_en")) { in enable_disable_all_channels()
234 ent->d_name); in enable_disable_all_channels()
235 ret = write_sysfs_int(ent->d_name, scanelemdir, in enable_disable_all_channels()
239 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()
254 static int __del_trace_probe_event(int fd, struct str_node *ent) in __del_trace_probe_event() argument
261 ret = e_snprintf(buf, 128, "-:%s", ent->s); in __del_trace_probe_event()
268 ent->s); in __del_trace_probe_event()
292 struct str_node *ent; in probe_file__get_events() local
303 strlist__for_each_entry(ent, namelist) { in probe_file__get_events()
304 p = strchr(ent->s, ':'); in probe_file__get_events()
306 strfilter__compare(filter, ent->s)) { in probe_file__get_events()
[all …]
Dauxtrace.c868 struct auxtrace_index_entry ent; in auxtrace_index__do_write() local
872 ent.file_offset = auxtrace_index->entries[i].file_offset; in auxtrace_index__do_write()
873 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write()
874 if (writen(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__do_write()
905 struct auxtrace_index_entry ent; in auxtrace_index__process_entry() local
908 if (readn(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__process_entry()
918 bswap_64(ent.file_offset); in auxtrace_index__process_entry()
919 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry()
921 auxtrace_index->entries[nr].file_offset = ent.file_offset; in auxtrace_index__process_entry()
922 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry()
[all …]
Dparse-events.c2634 struct probe_cache_entry *ent; in print_sdt_events() local
2656 list_for_each_entry(ent, &pcache->entries, node) { in print_sdt_events()
2657 if (!ent->sdt) in print_sdt_events()
2660 !strglobmatch(ent->pev.group, subsys_glob)) in print_sdt_events()
2663 !strglobmatch(ent->pev.event, event_glob)) in print_sdt_events()
2665 ret = asprintf(&buf, "%s:%s@%s", ent->pev.group, in print_sdt_events()
2666 ent->pev.event, nd->s); in print_sdt_events()
Dheader.c1241 struct dirent *ent; in memory_node__read() local
1245 while ((ent = readdir(dir))) \ in memory_node__read()
1246 if (strcmp(ent->d_name, ".") && \ in memory_node__read()
1247 strcmp(ent->d_name, "..") && \ in memory_node__read()
1248 sscanf(ent->d_name, "memory%u", &mem) == 1) in memory_node__read()
1296 struct dirent *ent; in build_mem_topology() local
1311 while (!ret && (ent = readdir(dir))) { in build_mem_topology()
1315 if (!strcmp(ent->d_name, ".") || in build_mem_topology()
1316 !strcmp(ent->d_name, "..")) in build_mem_topology()
1319 r = sscanf(ent->d_name, "node%u", &idx); in build_mem_topology()
Dmachine.c2639 u8 *cpumode, int ent) in find_prev_cpumode() argument
2643 while (--ent >= 0) { in find_prev_cpumode()
2644 u64 ip = chain->ips[ent]; in find_prev_cpumode()
Dprobe-event.c2619 struct str_node *ent; in __show_perf_probe_events() local
2628 strlist__for_each_entry(ent, rawlist) { in __show_perf_probe_events()
2629 ret = parse_probe_trace_command(ent->s, &tev); in __show_perf_probe_events()
/tools/bpf/bpftool/skeleton/
Dpid_iter.bpf.c25 static __always_inline __u32 get_obj_id(void *ent, enum bpf_obj_type type) in get_obj_id() argument
29 return BPF_CORE_READ((struct bpf_prog *)ent, aux, id); in get_obj_id()
31 return BPF_CORE_READ((struct bpf_map *)ent, id); in get_obj_id()
33 return BPF_CORE_READ((struct btf *)ent, id); in get_obj_id()
35 return BPF_CORE_READ((struct bpf_link *)ent, id); in get_obj_id()
/tools/hv/
Dhv_vss_daemon.c117 struct mntent *ent; in vss_operate() local
139 while ((ent = getmntent(mounts))) { in vss_operate()
140 if (strncmp(ent->mnt_fsname, match, strlen(match))) in vss_operate()
142 if (stat(ent->mnt_fsname, &sb)) { in vss_operate()
144 ent->mnt_fsname, errno, strerror(errno)); in vss_operate()
151 if (hasmntopt(ent, MNTOPT_RO) != NULL) in vss_operate()
153 if (strcmp(ent->mnt_type, "vfat") == 0) in vss_operate()
155 if (strcmp(ent->mnt_dir, "/") == 0) { in vss_operate()
159 error |= vss_do_freeze(ent->mnt_dir, cmd); in vss_operate()
184 if (ent) { in vss_operate()
[all …]
/tools/gpio/
Dlsgpio.c194 const struct dirent *ent; in main() local
205 while (ent = readdir(dp), ent) { in main()
206 if (check_prefix(ent->d_name, "gpiochip")) { in main()
207 ret = list_device(ent->d_name); in main()
/tools/perf/tests/
Dbuiltin-test.c503 #define for_each_shell_test(dir, base, ent) \ argument
504 while ((ent = readdir(dir)) != NULL) \
505 if (!is_directory(base, ent) && ent->d_name[0] != '.')
532 struct dirent *ent; in shell_tests__max_desc_width() local
544 for_each_shell_test(dir, path, ent) { in shell_tests__max_desc_width()
546 const char *desc = shell_test__description(bf, sizeof(bf), path, ent->d_name); in shell_tests__max_desc_width()
583 struct dirent *ent; in run_shell_tests() local
599 for_each_shell_test(dir, st.dir, ent) { in run_shell_tests()
603 .desc = shell_test__description(desc, sizeof(desc), st.dir, ent->d_name), in run_shell_tests()
611 st.file = ent->d_name; in run_shell_tests()
[all …]
Dparse-events.c1984 struct dirent *ent; in test_pmu_events() local
2003 while (!ret && (ent = readdir(dir))) { in test_pmu_events()
2008 if (strchr(ent->d_name, '.')) in test_pmu_events()
2011 snprintf(name, sizeof(name), "cpu/event=%s/u", ent->d_name); in test_pmu_events()
2019 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.c594 struct event_entry *ent; in perf_inject__sched_process_exit() local
596 list_for_each_entry(ent, &inject->samples, node) { in perf_inject__sched_process_exit()
597 if (sample->tid == ent->tid) { in perf_inject__sched_process_exit()
598 list_del_init(&ent->node); in perf_inject__sched_process_exit()
599 free(ent); in perf_inject__sched_process_exit()
614 struct event_entry *ent; in perf_inject__sched_switch() local
618 ent = malloc(event->header.size + sizeof(struct event_entry)); in perf_inject__sched_switch()
619 if (ent == NULL) { in perf_inject__sched_switch()
625 ent->tid = sample->tid; in perf_inject__sched_switch()
626 memcpy(&ent->event, event, event->header.size); in perf_inject__sched_switch()
[all …]
Dbuiltin-probe.c425 struct str_node *ent; in perf_del_probe_events() local
449 strlist__for_each_entry(ent, klist) in perf_del_probe_events()
450 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()
460 strlist__for_each_entry(ent, ulist) in perf_del_probe_events()
461 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()
/tools/testing/selftests/kvm/x86_64/
Dkvm_pv_test.c147 struct kvm_cpuid_entry2 ent = {0}; in clear_kvm_cpuid_features() local
149 ent.function = KVM_CPUID_FEATURES; in clear_kvm_cpuid_features()
150 TEST_ASSERT(set_cpuid(cpuid, &ent), in clear_kvm_cpuid_features()
/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c1232 struct kvm_cpuid_entry2 *ent) in set_cpuid() argument
1239 if (cur->function != ent->function || cur->index != ent->index) in set_cpuid()
1242 memcpy(cur, ent, sizeof(struct kvm_cpuid_entry2)); in set_cpuid()
/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h372 bool set_cpuid(struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 *ent);