Home
last modified time | relevance | path

Searched refs:verbs (Results 1 – 25 of 34) sorted by relevance

12

/systemd-251/src/test/
Dtest-verbs.c14 #define test_dispatch_one(argv, verbs, expected) \ argument
16 assert_se(dispatch_verb(strv_length(argv), argv, verbs, NULL) == expected);
18 TEST(verbs) { in TEST() argument
19 static const Verb verbs[] = { in TEST() local
32 test_dispatch_one(STRV_MAKE("command-not-found"), verbs, -EINVAL); in TEST()
35 test_dispatch_one(STRV_MAKE("show"), verbs, 0); in TEST()
38 test_dispatch_one(STRV_MAKE("copy-to", "foo"), verbs, -EINVAL); in TEST()
41 test_dispatch_one(STRV_MAKE("status", "foo", "bar"), verbs, 0); in TEST()
44 … test_dispatch_one(STRV_MAKE("copy-to", "foo", "bar", "baz", "quux", "qaax"), verbs, -EINVAL); in TEST()
47 test_dispatch_one(STRV_MAKE_EMPTY, verbs, 0); in TEST()
[all …]
/systemd-251/src/shared/
Dverbs.c48 const Verb* verbs_find_verb(const char *name, const Verb verbs[]) { in verbs_find_verb() argument
49 for (size_t i = 0; verbs[i].dispatch; i++) in verbs_find_verb()
50 if (streq_ptr(name, verbs[i].verb) || in verbs_find_verb()
51 (!name && FLAGS_SET(verbs[i].flags, VERB_DEFAULT))) in verbs_find_verb()
52 return &verbs[i]; in verbs_find_verb()
58 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) { in dispatch_verb() argument
63 assert(verbs); in dispatch_verb()
64 assert(verbs[0].dispatch); in dispatch_verb()
74 verb = verbs_find_verb(name, verbs); in dispatch_verb()
Dverbs.h22 const Verb* verbs_find_verb(const char *name, const Verb verbs[]);
23 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata);
Dmeson.build326 'verbs.c',
327 'verbs.h',
/systemd-251/src/hwdb/
Dhwdb.c108 static const Verb verbs[] = { in hwdb_main() local
114 return dispatch_verb(argc, argv, verbs, NULL); in hwdb_main()
/systemd-251/src/udev/
Dudevadm.c97 static const Verb verbs[] = { in udevadm_main() local
113 return dispatch_verb(argc, argv, verbs, NULL); in udevadm_main()
/systemd-251/src/oom/
Doomctl.c120 static const Verb verbs[] = { in run() local
136 return dispatch_verb(argc, argv, verbs, NULL); in run()
/systemd-251/src/id128/
Did128.c235 static const Verb verbs[] = { in id128_main() local
245 return dispatch_verb(argc, argv, verbs, NULL); in id128_main()
/systemd-251/shell-completion/bash/
Dudevadm71 local verbs=(info trigger settle control monitor test-builtin test wait lock)
75 if __contains_word "${COMP_WORDS[i]}" "${verbs[@]}"; then
85 COMPREPLY=( $(compgen -W '${verbs[*]}' -- "$cur") )
/systemd-251/src/import/
Dimport-fs.c371 static const Verb verbs[] = { in import_fs_main() local
377 return dispatch_verb(argc, argv, verbs, NULL); in import_fs_main()
Dexport.c271 static const Verb verbs[] = { in export_main() local
278 return dispatch_verb(argc, argv, verbs, NULL); in export_main()
Dimport.c438 static const Verb verbs[] = { in import_main() local
445 return dispatch_verb(argc, argv, verbs, NULL); in import_main()
Dpull.c527 static const Verb verbs[] = { in pull_main() local
534 return dispatch_verb(argc, argv, verbs, NULL); in pull_main()
/systemd-251/src/systemctl/
Dsystemctl.c1021 static const Verb verbs[] = { in systemctl_main() local
1102 const Verb *verb = verbs_find_verb(argv[optind], verbs); in systemctl_main()
1108 return dispatch_verb(argc, argv, verbs, NULL); in systemctl_main()
/systemd-251/src/boot/
Dbless-boot.c501 static const Verb verbs[] = { in run() local
527 return dispatch_verb(argc, argv, verbs, NULL); in run()
/systemd-251/src/analyze/
Danalyze.c542 static const Verb verbs[] = { in run() local
607 return dispatch_verb(argc, argv, verbs, NULL); in run()
/systemd-251/src/locale/
Dlocalectl.c482 static const Verb verbs[] = { in localectl_main() local
497 return dispatch_verb(argc, argv, verbs, bus); in localectl_main()
/systemd-251/src/hostname/
Dhostnamectl.c667 static const Verb verbs[] = { in hostnamectl_main() local
683 return dispatch_verb(argc, argv, verbs, bus); in hostnamectl_main()
/systemd-251/src/creds/
Dcreds.c901 static const Verb verbs[] = { in creds_main() local
912 return dispatch_verb(argc, argv, verbs, NULL); in creds_main()
/systemd-251/src/sysext/
Dsysext.c989 static const Verb verbs[] = { in sysext_main() local
999 return dispatch_verb(argc, argv, verbs, NULL); in sysext_main()
/systemd-251/src/timedate/
Dtimedatectl.c1009 static const Verb verbs[] = { in timedatectl_main() local
1025 return dispatch_verb(argc, argv, verbs, bus); in timedatectl_main()
/systemd-251/src/userdb/
Duserdbctl.c1307 static const Verb verbs[] = { in run() local
1343 return dispatch_verb(argc, argv, verbs, NULL); in run()
/systemd-251/src/coredump/
Dcoredumpctl.c1246 static const Verb verbs[] = { in coredumpctl_main() local
1256 return dispatch_verb(argc, argv, verbs, NULL); in coredumpctl_main()
/systemd-251/src/portable/
Dportablectl.c1405 static const Verb verbs[] = { in run() local
1427 return dispatch_verb(argc, argv, verbs, NULL); in run()
/systemd-251/src/login/
Dloginctl.c1420 static const Verb verbs[] = { in loginctl_main() local
1448 return dispatch_verb(argc, argv, verbs, bus); in loginctl_main()

12