/systemd/src/test/ |
H A D | test-verbs.c | 22 #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 D | verbs.c | 28 #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 D | verbs.h | 33 int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata);
|
/systemd/src/hostname/ |
H A D | hostnamectl.c | 438 } 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 D | timedatectl.c | 421 } 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 D | localectl.c | 593 } 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 D | export.c | 34 #include "verbs.h" 293 static const Verb verbs[] = { local 300 return dispatch_verb(argc, argv, verbs, NULL);
|
H A D | import.c | 34 #include "verbs.h" 310 static const Verb verbs[] = { local 317 return dispatch_verb(argc, argv, verbs, NULL);
|
H A D | pull.c | 33 #include "verbs.h" 310 static const Verb verbs[] = { local 317 return dispatch_verb(argc, argv, verbs, NULL);
|
/systemd/src/boot/ |
H A D | bootctl.c | 1002 } 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 D | hwdb.c | 37 #include "verbs.h" 716 const Verb verbs[] = { local 722 return dispatch_verb(argc, argv, verbs, NULL);
|
/systemd/src/network/ |
H A D | networkctl.c | 47 #include "verbs.h" 1086 const Verb verbs[] = { local 1093 return dispatch_verb(argc, argv, verbs, NULL);
|
/systemd/src/login/ |
H A D | loginctl.c | 47 #include "verbs.h" 1503 static const Verb verbs[] = { local 1531 return dispatch_verb(argc, argv, verbs, bus);
|
/systemd/src/machine/ |
H A D | machinectl.c | 59 #include "verbs.h" 2609 static const Verb verbs[] = { local 2645 return dispatch_verb(argc, argv, verbs, bus);
|
/systemd/src/systemctl/ |
H A D | systemctl.c | 84 #include "verbs.h" 7317 static const Verb verbs[] = { local 7386 return dispatch_verb(argc, argv, verbs, NULL);
|