Home
last modified time | relevance | path

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

/tools/iio/
Dlsiio.c46 const struct dirent *ent; in dump_channels() local
52 while (ent = readdir(dp), ent) in dump_channels()
53 if (check_prefix(ent->d_name, "in_") && in dump_channels()
54 check_postfix(ent->d_name, "_raw")) in dump_channels()
55 printf(" %-10s\n", ent->d_name); in dump_channels()
105 const struct dirent *ent; in dump_devices() local
115 while (ent = readdir(dp), ent) { in dump_devices()
116 if (check_prefix(ent->d_name, type_device)) { in dump_devices()
120 ent->d_name) < 0) { in dump_devices()
137 while (ent = readdir(dp), ent) { in dump_devices()
[all …]
Diio_utils.c99 const struct dirent *ent; in iioutils_get_type() local
123 while (ent = readdir(dp), ent) in iioutils_get_type()
128 if ((strcmp(builtname, ent->d_name) == 0) || in iioutils_get_type()
129 (strcmp(builtname_generic, ent->d_name) == 0)) { in iioutils_get_type()
131 "%s/%s", scan_el_dir, ent->d_name); 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()
249 "%s/%s", device_dir, ent->d_name); in iioutils_get_param_float()
[all …]
/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/
Dprobe-file.c171 struct str_node *ent; in __probe_file__get_namelist() local
180 strlist__for_each(ent, rawlist) { in __probe_file__get_namelist()
181 ret = parse_probe_trace_command(ent->s, &tev); in __probe_file__get_namelist()
235 static int __del_trace_probe_event(int fd, struct str_node *ent) in __del_trace_probe_event() argument
242 ret = e_snprintf(buf, 128, "-:%s", ent->s); in __del_trace_probe_event()
249 ent->s); in __del_trace_probe_event()
273 struct str_node *ent; in probe_file__get_events() local
284 strlist__for_each(ent, namelist) { in probe_file__get_events()
285 p = strchr(ent->s, ':'); in probe_file__get_events()
287 strfilter__compare(filter, ent->s)) { in probe_file__get_events()
[all …]
Dauxtrace.c639 struct auxtrace_index_entry ent; in auxtrace_index__do_write() local
643 ent.file_offset = auxtrace_index->entries[i].file_offset; in auxtrace_index__do_write()
644 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write()
645 if (writen(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__do_write()
676 struct auxtrace_index_entry ent; in auxtrace_index__process_entry() local
679 if (readn(fd, &ent, sizeof(ent)) != sizeof(ent)) in auxtrace_index__process_entry()
689 bswap_64(ent.file_offset); in auxtrace_index__process_entry()
690 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry()
692 auxtrace_index->entries[nr].file_offset = ent.file_offset; in auxtrace_index__process_entry()
693 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry()
[all …]
Dhelp.c10 struct cmdname *ent = malloc(sizeof(*ent) + len + 1); in add_cmdname() local
12 ent->len = len; in add_cmdname()
13 memcpy(ent->name, name, len); in add_cmdname()
14 ent->name[len] = 0; in add_cmdname()
17 cmds->names[cmds->cnt++] = ent; in add_cmdname()
Dprobe-event.c2248 struct str_node *ent; in __show_perf_probe_events() local
2257 strlist__for_each(ent, rawlist) { in __show_perf_probe_events()
2258 ret = parse_probe_trace_command(ent->s, &tev); in __show_perf_probe_events()
/tools/hv/
Dhv_vss_daemon.c72 struct mntent *ent; in vss_operate() local
92 while ((ent = getmntent(mounts))) { in vss_operate()
93 if (strncmp(ent->mnt_fsname, match, strlen(match))) in vss_operate()
95 if (hasmntopt(ent, MNTOPT_RO) != NULL) in vss_operate()
97 if (strcmp(ent->mnt_type, "vfat") == 0) in vss_operate()
99 if (strcmp(ent->mnt_dir, "/") == 0) { in vss_operate()
103 error |= vss_do_freeze(ent->mnt_dir, cmd); in vss_operate()
119 if (ent) { in vss_operate()
120 strncpy(errdir, ent->mnt_dir, sizeof(errdir)-1); in vss_operate()
125 if (ent) in vss_operate()
/tools/perf/
Dbuiltin-inject.c404 struct event_entry *ent; in perf_inject__sched_process_exit() local
406 list_for_each_entry(ent, &inject->samples, node) { in perf_inject__sched_process_exit()
407 if (sample->tid == ent->tid) { in perf_inject__sched_process_exit()
408 list_del_init(&ent->node); in perf_inject__sched_process_exit()
409 free(ent); in perf_inject__sched_process_exit()
424 struct event_entry *ent; in perf_inject__sched_switch() local
428 ent = malloc(event->header.size + sizeof(struct event_entry)); in perf_inject__sched_switch()
429 if (ent == NULL) { in perf_inject__sched_switch()
435 ent->tid = sample->tid; in perf_inject__sched_switch()
436 memcpy(&ent->event, event, event->header.size); in perf_inject__sched_switch()
[all …]
Dbuiltin-probe.c371 struct str_node *ent; in perf_del_probe_events() local
392 strlist__for_each(ent, klist) in perf_del_probe_events()
393 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()
402 strlist__for_each(ent, ulist) in perf_del_probe_events()
403 pr_info("Removed event: %s\n", ent->s); in perf_del_probe_events()
/tools/perf/tests/
Dparse-events.c1710 struct dirent *ent; in test_pmu_events() local
1729 while (!ret && (ent = readdir(dir))) { in test_pmu_events()
1733 if (!strcmp(ent->d_name, ".") || in test_pmu_events()
1734 !strcmp(ent->d_name, "..")) in test_pmu_events()
1737 snprintf(name, sizeof(name), "cpu/event=%s/u", ent->d_name); in test_pmu_events()
1745 snprintf(name, sizeof(name), "%s:u,cpu/event=%s/u", ent->d_name, ent->d_name); in test_pmu_events()