| /tools/lib/subcmd/ |
| A D | help.c | 27 ALLOC_GROW(cmds->names, cmds->cnt + 1, cmds->alloc); in add_cmdname() 28 cmds->names[cmds->cnt++] = ent; in add_cmdname() 38 cmds->cnt = 0; in clean_cmdnames() 39 cmds->alloc = 0; in clean_cmdnames() 53 if (!cmds->cnt) in uniq() 57 if (!strcmp(cmds->names[i]->name, cmds->names[i-1]->name)) in uniq() 65 cmds->names[j++] = cmds->names[i]; in uniq() 68 cmds->cnt = j; in uniq() 86 cmds->names[cj++] = cmds->names[ci]; in exclude_cmds() 99 cmds->names[cj++] = cmds->names[ci]; in exclude_cmds() [all …]
|
| A D | help.h | 26 void add_cmdname(struct cmdnames *cmds, const char *name, size_t len); 27 void clean_cmdnames(struct cmdnames *cmds); 29 void uniq(struct cmdnames *cmds); 31 void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
|
| /tools/perf/tests/ |
| A D | subcmd-help.c | 9 struct cmdnames cmds = {}; in test__load_cmdnames() local 11 add_cmdname(&cmds, "aaa", 3); in test__load_cmdnames() 12 add_cmdname(&cmds, "foo", 3); in test__load_cmdnames() 13 add_cmdname(&cmds, "xyz", 3); in test__load_cmdnames() 19 clean_cmdnames(&cmds); in test__load_cmdnames() 26 struct cmdnames cmds = {}; in test__uniq_cmdnames() local 29 add_cmdname(&cmds, "aaa", 3); in test__uniq_cmdnames() 30 add_cmdname(&cmds, "aaa", 3); in test__uniq_cmdnames() 31 add_cmdname(&cmds, "bbb", 3); in test__uniq_cmdnames() 35 uniq(&cmds); in test__uniq_cmdnames() [all …]
|
| /tools/perf/util/ |
| A D | help-unknown-cmd.c | 32 static int add_cmd_list(struct cmdnames *cmds, struct cmdnames *old) in add_cmd_list() argument 34 unsigned int i, nr = cmds->cnt + old->cnt; in add_cmd_list() 37 if (nr > cmds->alloc) { in add_cmd_list() 39 if (alloc_nr(cmds->alloc) < nr) in add_cmd_list() 40 cmds->alloc = nr; in add_cmd_list() 42 cmds->alloc = alloc_nr(cmds->alloc); in add_cmd_list() 43 tmp = realloc(cmds->names, cmds->alloc * sizeof(*cmds->names)); in add_cmd_list() 46 cmds->names = tmp; in add_cmd_list() 49 cmds->names[cmds->cnt++] = old->names[i]; in add_cmd_list()
|
| /tools/usb/usbip/src/ |
| A D | usbip.c | 41 static const struct command cmds[] = { variable 100 for (i = 0; cmds[i].name != NULL; i++) in usbip_help() 101 if (!strcmp(cmds[i].name, argv[0]) && cmds[i].usage) { in usbip_help() 102 cmds[i].usage(); in usbip_help() 110 for (cmd = cmds; cmd->name != NULL; cmd++) in usbip_help() 177 for (i = 0; cmds[i].name != NULL; i++) in main() 178 if (!strcmp(cmds[i].name, cmd)) { in main() 182 rc = run_command(&cmds[i], argc, argv); in main()
|
| /tools/testing/selftests/tc-testing/plugin-lib/ |
| A D | nsPlugin.py | 163 cmds = [] 167 cmds.append(self._replace_keywords('netns add {}'.format(ns))) 168 cmds.append(self._replace_keywords('link add $DEV1 type veth peer name $DEV0')) 169 cmds.append(self._replace_keywords('link set $DEV1 netns {}'.format(ns))) 170 cmds.append(self._replace_keywords('link add $DUMMY type dummy'.format(ns))) 171 cmds.append(self._replace_keywords('link set $DUMMY netns {}'.format(ns))) 172 cmds.append(self._replace_keywords('netns exec {} $IP link set $DEV1 up'.format(ns))) 173 cmds.append(self._replace_keywords('netns exec {} $IP link set $DUMMY up'.format(ns))) 174 cmds.append(self._replace_keywords('link set $DEV0 up'.format(ns))) 177 cmds.append(self._replace_keywords('link set $DEV2 netns {}'.format(ns))) [all …]
|
| /tools/perf/ |
| A D | perf-completion.sh | 131 cmds_=$($cmd $1 --list-cmds) 159 cmds=$($cmd --list-opts) 161 cmds=$($cmd --list-cmds) 163 __perfcomp "$cmds" "$cur" 220 subcmds=$($cmd $prev_skip_opts --list-cmds)
|
| A D | .gitignore | 18 common-cmds.h
|
| A D | Makefile.perf | 812 $(OUTPUT)common-cmds.h: util/generate-cmdlist.sh command-list.txt 814 $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt) 854 prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders \ 1058 check: $(OUTPUT)common-cmds.h 1286 $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE \
|
| /tools/bpf/bpftool/ |
| A D | main.c | 187 int cmd_select(const struct cmd *cmds, int argc, char **argv, in cmd_select() argument 196 if (argc < 1 && cmds[0].func) in cmd_select() 197 return cmds[0].func(argc, argv); in cmd_select() 199 for (i = 0; cmds[i].cmd; i++) { in cmd_select() 200 if (is_prefix(*argv, cmds[i].cmd)) { in cmd_select() 201 if (!cmds[i].func) { in cmd_select() 203 cmds[i].cmd); in cmd_select() 206 return cmds[i].func(argc - 1, argv + 1); in cmd_select()
|
| A D | iter.c | 114 static const struct cmd cmds[] = { variable 122 return cmd_select(cmds, argc, argv, do_help); in do_iter()
|
| A D | perf.c | 248 static const struct cmd cmds[] = { variable 257 return cmd_select(cmds, argc, argv, do_help); in do_perf()
|
| A D | cgroup.c | 676 static const struct cmd cmds[] = { variable 688 return cmd_select(cmds, argc, argv, do_help); in do_cgroup()
|
| A D | struct_ops.c | 629 static const struct cmd cmds[] = { variable 643 err = cmd_select(cmds, argc, argv, do_help); in do_struct_ops()
|
| A D | main.h | 134 int cmd_select(const struct cmd *cmds, int argc, char **argv,
|
| A D | feature.c | 1354 static const struct cmd cmds[] = { variable 1363 return cmd_select(cmds, argc, argv, do_help); in do_feature()
|
| A D | net.c | 1009 static const struct cmd cmds[] = { variable 1020 return cmd_select(cmds, argc, argv, do_help); in do_net()
|
| A D | link.c | 1240 static const struct cmd cmds[] = { variable 1251 return cmd_select(cmds, argc, argv, do_help); in do_link()
|
| A D | map.c | 1489 static const struct cmd cmds[] = { variable 1512 return cmd_select(cmds, argc, argv, do_help); in do_map()
|
| A D | btf.c | 1460 static const struct cmd cmds[] = { variable 1470 return cmd_select(cmds, argc, argv, do_help); in do_btf()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | token.c | 95 __u64 cmds; member 121 err = set_delegate_mask(fs_fd, "delegate_cmds", opts->cmds, opts->cmds_str); in materialize_bpffs_fd() 1097 .cmds = 1ULL << BPF_BTF_LOAD, in test_token() 1113 .cmds = bit(BPF_MAP_CREATE), in test_token() 1121 .cmds = bit(BPF_PROG_LOAD), in test_token() 1130 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_PROG_LOAD) | bit(BPF_BTF_GET_FD_BY_ID), in test_token() 1147 .cmds = bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), in test_token() 1158 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), in test_token() 1169 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), in test_token() 1180 .cmds = bit(BPF_BTF_LOAD) | bit(BPF_MAP_CREATE) | bit(BPF_PROG_LOAD), in test_token() [all …]
|
| /tools/testing/selftests/drivers/s390x/uvdevice/ |
| A D | test_uvdevice.c | 130 unsigned long cmds[] = { in TEST_F() local 138 for (size_t i = 0; i < ARRAY_SIZE(cmds); i++) { in TEST_F() 139 rc = ioctl(self->uv_fd, cmds[i], &self->uvio_ioctl); in TEST_F()
|
| /tools/bpf/ |
| A D | bpf_dbg.c | 1245 static const struct shell_cmd cmds[] = { variable 1265 for (i = 0; i < array_size(cmds); i++) { in execf() 1266 if (len != strlen(cmds[i].name)) in execf() 1268 if (strncmp(cmds[i].name, cmd, len) == 0) { in execf() 1269 ret = cmds[i].func(cont); in execf() 1287 for (; list_index < array_size(cmds); ) { in shell_comp_gen() 1288 const char *name = cmds[list_index].name; in shell_comp_gen()
|
| /tools/perf/Documentation/ |
| A D | perf.txt | 43 --list-cmds::
|
| /tools/power/x86/intel-speed-select/ |
| A D | isst-config.c | 3073 struct process_cmd_struct *cmds) in process_command() argument 3094 while (cmds[i].feature) { in process_command() 3095 if (!strcmp(cmds[i].feature, feature) && in process_command() 3096 !strcmp(cmds[i].command, cmd)) { in process_command() 3098 cmds[i].process_fn(cmds[i].arg); in process_command()
|