Searched refs:verbs (Results 1 - 15 of 15) sorted by relevance

/systemd/src/test/
H A Dtest-verbs.c22 #include "verbs.h"
28 #define test_dispatch_one(argv, verbs, expected) \
30 assert_se(dispatch_verb(strv_length(argv), argv, verbs, NULL) == expected);
33 static const Verb verbs[] = { local
46 test_dispatch_one(STRV_MAKE("command-not-found"), verbs, -EINVAL);
49 test_dispatch_one(STRV_MAKE("show"), verbs, 0);
52 test_dispatch_one(STRV_MAKE("copy-to", "foo"), verbs, -EINVAL);
55 test_dispatch_one(STRV_MAKE("status", "foo", "bar"), verbs, 0);
58 test_dispatch_one(STRV_MAKE("copy-to", "foo", "bar", "baz", "quux", "qaax"), verbs, -EINVAL);
61 test_dispatch_one(STRV_MAKE_EMPTY, verbs,
65 static const Verb verbs[] = { local
70 test_dispatch_one(STRV_MAKE(NULL), verbs, -EINVAL); local
[all...]
/systemd/src/basic/
H A Dverbs.c28 #include "verbs.h"
31 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) { argument
37 assert(verbs);
38 assert(verbs[0].dispatch);
50 if (!verbs[i].dispatch) {
59 found = streq(name, verbs[i].verb);
61 found = !!(verbs[i].flags & VERB_DEFAULT);
64 verb = &verbs[i];
H A Dverbs.h33 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata);
/systemd/src/hostname/
H A Dhostnamectl.c438 } verbs[] = { local
464 for (i = 0; i < ELEMENTSOF(verbs); i++)
465 if (streq(argv[optind], verbs[i].verb))
468 if (i >= ELEMENTSOF(verbs)) {
474 switch (verbs[i].argc_cmp) {
477 if (left != verbs[i].argc) {
485 if (left < verbs[i].argc) {
493 if (left > verbs[i].argc) {
504 return verbs[i].dispatch(bus, argv + optind, left);
/systemd/src/timedate/
H A Dtimedatectl.c421 } verbs[] = { local
447 for (i = 0; i < ELEMENTSOF(verbs); i++)
448 if (streq(argv[optind], verbs[i].verb))
451 if (i >= ELEMENTSOF(verbs)) {
457 switch (verbs[i].argc_cmp) {
460 if (left != verbs[i].argc) {
468 if (left < verbs[i].argc) {
476 if (left > verbs[i].argc) {
487 return verbs[i].dispatch(bus, argv + optind, left);
/systemd/src/locale/
H A Dlocalectl.c593 } verbs[] = { local
623 for (i = 0; i < ELEMENTSOF(verbs); i++)
624 if (streq(argv[optind], verbs[i].verb))
627 if (i >= ELEMENTSOF(verbs)) {
633 switch (verbs[i].argc_cmp) {
636 if (left != verbs[i].argc) {
644 if (left < verbs[i].argc) {
652 if (left > verbs[i].argc) {
663 return verbs[i].dispatch(bus, argv + optind, left);
/systemd/src/import/
H A Dexport.c34 #include "verbs.h"
293 static const Verb verbs[] = { local
300 return dispatch_verb(argc, argv, verbs, NULL);
H A Dimport.c34 #include "verbs.h"
310 static const Verb verbs[] = { local
317 return dispatch_verb(argc, argv, verbs, NULL);
H A Dpull.c33 #include "verbs.h"
310 static const Verb verbs[] = { local
317 return dispatch_verb(argc, argv, verbs, NULL);
/systemd/src/boot/
H A Dbootctl.c1002 } verbs[] = { local
1017 for (i = 0; i < ELEMENTSOF(verbs); i++) {
1018 if (!streq(argv[optind], verbs[i].verb))
1020 arg_action = verbs[i].action;
1023 if (i >= ELEMENTSOF(verbs)) {
/systemd/src/hwdb/
H A Dhwdb.c37 #include "verbs.h"
716 const Verb verbs[] = { local
722 return dispatch_verb(argc, argv, verbs, NULL);
/systemd/src/network/
H A Dnetworkctl.c47 #include "verbs.h"
1086 const Verb verbs[] = { local
1093 return dispatch_verb(argc, argv, verbs, NULL);
/systemd/src/login/
H A Dloginctl.c47 #include "verbs.h"
1503 static const Verb verbs[] = { local
1531 return dispatch_verb(argc, argv, verbs, bus);
/systemd/src/machine/
H A Dmachinectl.c59 #include "verbs.h"
2609 static const Verb verbs[] = { local
2645 return dispatch_verb(argc, argv, verbs, bus);
/systemd/src/systemctl/
H A Dsystemctl.c84 #include "verbs.h"
7317 static const Verb verbs[] = { local
7386 return dispatch_verb(argc, argv, verbs, NULL);

Completed in 6736 milliseconds