/systemd-251/src/id128/ |
D | id128.c | 20 static int verb_new(int argc, char **argv, void *userdata) { in verb_new() argument 24 static int verb_machine_id(int argc, char **argv, void *userdata) { in verb_machine_id() argument 39 static int verb_boot_id(int argc, char **argv, void *userdata) { in verb_boot_id() argument 54 static int verb_invocation_id(int argc, char **argv, void *userdata) { in verb_invocation_id() argument 103 static int verb_show(int argc, char **argv, void *userdata) { in verb_show() argument 107 argv = strv_skip(argv, 1); in verb_show() 108 if (strv_isempty(argv)) in verb_show() 115 STRV_FOREACH(p, argv) { in verb_show() 133 r = show_one(&table, id, uuid, p == argv); in verb_show() 178 static int verb_help(int argc, char **argv, void *userdata) { in verb_help() argument [all …]
|
/systemd-251/src/login/ |
D | loginctl.c | 116 static int list_sessions(int argc, char *argv[], void *userdata) { in list_sessions() argument 124 assert(argv); in list_sessions() 190 static int list_users(int argc, char *argv[], void *userdata) { in list_users() argument 198 assert(argv); in list_users() 240 static int list_seats(int argc, char *argv[], void *userdata) { in list_seats() argument 248 assert(argv); in list_seats() 799 static int show_session(int argc, char *argv[], void *userdata) { in show_session() argument 807 assert(argv); in show_session() 809 properties = !strstr(argv[0], "status"); in show_session() 822 r = get_session_path(bus, argv[i], &error, &path); in show_session() [all …]
|
/systemd-251/src/import/ |
D | export.c | 60 static int export_tar(int argc, char *argv[], void *userdata) { in export_tar() argument 68 if (hostname_is_valid(argv[1], 0)) { in export_tar() 69 r = image_find(IMAGE_MACHINE, argv[1], NULL, &image); in export_tar() 71 return log_error_errno(r, "Machine image %s not found.", argv[1]); in export_tar() 73 return log_error_errno(r, "Failed to look for machine %s: %m", argv[1]); in export_tar() 77 local = argv[1]; in export_tar() 80 path = argv[2]; in export_tar() 136 static int export_raw(int argc, char *argv[], void *userdata) { in export_raw() argument 144 if (hostname_is_valid(argv[1], 0)) { in export_raw() 145 r = image_find(IMAGE_MACHINE, argv[1], NULL, &image); in export_raw() [all …]
|
D | import.c | 129 static int import_tar(int argc, char *argv[], void *userdata) { in import_tar() argument 138 path = empty_or_dash_to_null(argv[1]); in import_tar() 141 local = empty_or_dash_to_null(argv[2]); in import_tar() 201 static int import_raw(int argc, char *argv[], void *userdata) { in import_raw() argument 210 path = empty_or_dash_to_null(argv[1]); in import_raw() 213 local = empty_or_dash_to_null(argv[2]); in import_raw() 265 static int help(int argc, char *argv[], void *userdata) { in help() argument 297 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 332 assert(argv); in parse_argv() 334 while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) in parse_argv() [all …]
|
/systemd-251/src/locale/ |
D | localectl.c | 119 static int show_status(int argc, char **argv, void *userdata) { in show_status() argument 156 static int set_locale(int argc, char **argv, void *userdata) { in set_locale() argument 170 r = sd_bus_message_append_strv(m, argv + 1); in set_locale() 186 static int list_locales(int argc, char **argv, void *userdata) { in list_locales() argument 200 static int set_vconsole_keymap(int argc, char **argv, void *userdata) { in set_vconsole_keymap() argument 210 map = argv[1]; in set_vconsole_keymap() 211 toggle_map = argc > 2 ? argv[2] : ""; in set_vconsole_keymap() 226 static int list_vconsole_keymaps(int argc, char **argv, void *userdata) { in list_vconsole_keymaps() argument 241 static int set_x11_keymap(int argc, char **argv, void *userdata) { in set_x11_keymap() argument 249 layout = argv[1]; in set_x11_keymap() [all …]
|
/systemd-251/src/udev/ |
D | udevadm.h | 8 int info_main(int argc, char *argv[], void *userdata); 9 int trigger_main(int argc, char *argv[], void *userdata); 10 int settle_main(int argc, char *argv[], void *userdata); 11 int control_main(int argc, char *argv[], void *userdata); 12 int monitor_main(int argc, char *argv[], void *userdata); 13 int hwdb_main(int argc, char *argv[], void *userdata); 14 int test_main(int argc, char *argv[], void *userdata); 15 int builtin_main(int argc, char *argv[], void *userdata); 16 int wait_main(int argc, char *argv[], void *userdata); 17 int lock_main(int argc, char *argv[], void *userdata);
|
D | udevadm.c | 53 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 63 assert(argv); in parse_argv() 65 while ((c = getopt_long(argc, argv, "+dhV", options, NULL)) >= 0) in parse_argv() 88 static int version_main(int argc, char *argv[], void *userdata) { in version_main() argument 92 static int help_main(int argc, char *argv[], void *userdata) { in help_main() argument 96 static int udevadm_main(int argc, char *argv[]) { in udevadm_main() argument 113 return dispatch_verb(argc, argv, verbs, NULL); in udevadm_main() 116 static int run(int argc, char *argv[]) { in run() argument 119 if (invoked_as(argv, "udevd")) in run() 120 return run_udevd(argc, argv); in run() [all …]
|
/systemd-251/src/machine/ |
D | machinectl.c | 266 static int list_machines(int argc, char *argv[], void *userdata) { in list_machines() argument 345 static int list_images(int argc, char *argv[], void *userdata) { in list_images() argument 696 static int show_machine(int argc, char *argv[], void *userdata) { in show_machine() argument 706 properties = !strstr(argv[0], "status"); in show_machine() 722 … r = bus_call_method(bus, bus_machine_mgr, "GetMachine", &error, &reply, "s", argv[i]); in show_machine() 733 r = show_machine_info(argv[0], bus, path, &new_line); in show_machine() 995 static int show_image(int argc, char *argv[], void *userdata) { in show_image() argument 1005 properties = !strstr(argv[0], "status"); in show_image() 1025 r = bus_call_method(bus, bus_machine_mgr, "GetImage", &error, &reply, "s", argv[i]); in show_image() 1042 static int kill_machine(int argc, char *argv[], void *userdata) { in kill_machine() argument [all …]
|
/systemd-251/src/hwdb/ |
D | hwdb.c | 20 static int verb_query(int argc, char *argv[], void *userdata) { in verb_query() argument 21 return hwdb_query(argv[1]); in verb_query() 24 static int verb_update(int argc, char *argv[], void *userdata) { in verb_update() argument 56 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 74 assert(argv); in parse_argv() 76 while ((c = getopt_long(argc, argv, "sr:h", options, NULL)) >= 0) in parse_argv() 107 static int hwdb_main(int argc, char *argv[]) { in hwdb_main() argument 114 return dispatch_verb(argc, argv, verbs, NULL); in hwdb_main() 117 static int run(int argc, char *argv[]) { in run() argument 123 r = parse_argv(argc, argv); in run() [all …]
|
/systemd-251/src/activate/ |
D | activate.c | 124 static int exec_process(const char *name, char **argv, int start_fd, size_t n_fds) { in exec_process() argument 203 _cleanup_free_ char *joined = strv_join(argv, " "); in exec_process() 208 execvpe(name, argv, envp); in exec_process() 213 static int fork_and_exec_process(const char *child, char **argv, int fd) { in fork_and_exec_process() argument 218 joined = strv_join(argv, " "); in fork_and_exec_process() 229 exec_process(child, argv, fd, 1); in fork_and_exec_process() 237 static int do_accept(const char *name, char **argv, int fd) { in do_accept() argument 253 return fork_and_exec_process(name, argv, fd_accepted); in do_accept() 320 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 345 assert(argv); in parse_argv() [all …]
|
/systemd-251/src/systemctl/ |
D | systemctl-trivial-method.c | 11 int verb_trivial_method(int argc, char *argv[], void *userdata) { in verb_trivial_method() argument 27 streq(argv[0], "clear-jobs") || in verb_trivial_method() 28 streq(argv[0], "cancel") ? "ClearJobs" : in verb_trivial_method() 29 streq(argv[0], "reset-failed") ? "ResetFailed" : in verb_trivial_method() 30 streq(argv[0], "halt") ? "Halt" : in verb_trivial_method() 31 streq(argv[0], "reboot") ? "Reboot" : in verb_trivial_method() 32 streq(argv[0], "kexec") ? "KExec" : in verb_trivial_method() 33 streq(argv[0], "exit") ? "Exit" : in verb_trivial_method()
|
D | systemctl.c | 380 static int systemctl_parse_argv(int argc, char *argv[]) { in systemctl_parse_argv() argument 490 assert(argv); in systemctl_parse_argv() 495 while ((c = getopt_long(argc, argv, "ht:p:P:alqfs:H:M:n:o:iTr.::", options, NULL)) >= 0) in systemctl_parse_argv() 938 bool do_reload_or_restart = streq_ptr(argv[optind], "reload-or-restart"); in systemctl_parse_argv() 962 int systemctl_dispatch_parse_argv(int argc, char *argv[]) { in systemctl_dispatch_parse_argv() argument 964 assert(argv); in systemctl_dispatch_parse_argv() 966 if (invoked_as(argv, "halt")) { in systemctl_dispatch_parse_argv() 968 return halt_parse_argv(argc, argv); in systemctl_dispatch_parse_argv() 970 } else if (invoked_as(argv, "poweroff")) { in systemctl_dispatch_parse_argv() 972 return halt_parse_argv(argc, argv); in systemctl_dispatch_parse_argv() [all …]
|
D | systemctl-mount.c | 10 int verb_bind(int argc, char *argv[], void *userdata) { in verb_bind() argument 22 r = unit_name_mangle(argv[1], arg_quiet ? 0 : UNIT_NAME_MANGLE_WARN, &n); in verb_bind() 34 argv[2], in verb_bind() 35 argv[3], in verb_bind() 44 int verb_mount_image(int argc, char *argv[], void *userdata) { in verb_mount_image() argument 46 const char *unit = argv[1], *src = argv[2], *dest = argv[3]; in verb_mount_image() 87 const char *options = argv[4]; in verb_mount_image()
|
D | fuzz-systemctl-parse-argv.c | 17 _cleanup_strv_free_ char **argv = NULL; in LLVMFuzzerTestOneInput() local 28 argv = strv_parse_nulstr((const char *)data, size); in LLVMFuzzerTestOneInput() 29 if (!argv) in LLVMFuzzerTestOneInput() 32 if (!argv[0]) in LLVMFuzzerTestOneInput() 34 if (strv_length(argv) > 1024) in LLVMFuzzerTestOneInput() 53 r = systemctl_dispatch_parse_argv(strv_length(argv), argv); in LLVMFuzzerTestOneInput()
|
D | systemctl-log-setting.c | 24 int verb_log_setting(int argc, char *argv[], void *userdata) { in verb_log_setting() argument 34 return verb_log_control_common(bus, "org.freedesktop.systemd1", argv[0], argv[1]); in verb_log_setting() 69 int verb_service_log_setting(int argc, char *argv[], void *userdata) { in verb_service_log_setting() argument 80 r = unit_name_mangle_with_suffix(argv[1], argv[0], in verb_service_log_setting() 90 r = verb_log_control_common(bus, dbus_name, argv[0], argv[2]); in verb_service_log_setting()
|
D | systemctl-compat-telinit.c | 45 int telinit_parse_argv(int argc, char *argv[]) { in telinit_parse_argv() argument 80 assert(argv); in telinit_parse_argv() 82 while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) in telinit_parse_argv() 108 if (strlen(argv[optind]) != 1) in telinit_parse_argv() 113 if (table[i].from == argv[optind][0]) in telinit_parse_argv() 118 "Unknown command '%s'.", argv[optind]); in telinit_parse_argv() 159 int exec_telinit(char *argv[]) { in exec_telinit() argument 161 (void) execv(TELINIT, argv); in exec_telinit()
|
/systemd-251/src/busctl/ |
D | busctl.c | 141 static int list_bus_names(int argc, char **argv, void *userdata) { in list_bus_names() argument 505 static int tree(int argc, char **argv, void *userdata) { in tree() argument 510 STRV_FOREACH(i, strv_skip(argv, 1)) in tree() 553 STRV_FOREACH(i, strv_skip(argv, 1)) { in tree() 556 if (i > argv+1) in tree() 559 if (argv[2]) { in tree() 945 static int introspect(int argc, char **argv, void *userdata) { in introspect() argument 970 r = sd_bus_call_method(bus, argv[1], argv[2], in introspect() 975 argv[2], argv[1], bus_error_message(&error, r)); in introspect() 989 r = parse_xml_introspect(argv[2], xml, &ops, members); in introspect() [all …]
|
/systemd-251/src/analyze/ |
D | analyze.c | 166 static int help(int argc, char *argv[], void *userdata) { in help() argument 254 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 314 assert(argv); in parse_argv() 316 while ((c = getopt_long(argc, argv, "hH:M:U:", options, NULL)) >= 0) in parse_argv() 491 if (arg_offline && !streq_ptr(argv[optind], "security")) in parse_argv() 495 …if (arg_json_format_flags != JSON_FORMAT_OFF && !STRPTR_IN_SET(argv[optind], "security", "inspect-… in parse_argv() 499 if (arg_threshold != 100 && !streq_ptr(argv[optind], "security")) in parse_argv() 504 !STR_IN_SET(argv[optind] ?: "time", "dot", "unit-paths", "verify")) in parse_argv() 508 if (streq_ptr(argv[optind], "cat-config") && arg_scope == LOOKUP_SCOPE_USER) in parse_argv() 512 if (arg_security_policy && !streq_ptr(argv[optind], "security")) in parse_argv() [all …]
|
/systemd-251/src/hostname/ |
D | hostnamectl.c | 363 static int show_status(int argc, char **argv, void *userdata) { in show_status() argument 431 static int set_hostname(int argc, char **argv, void *userdata) { in set_hostname() argument 433 const char *hostname = argv[1]; in set_hostname() 517 static int get_or_set_hostname(int argc, char **argv, void *userdata) { in get_or_set_hostname() argument 519 set_hostname(argc, argv, userdata); in get_or_set_hostname() 522 static int get_or_set_icon_name(int argc, char **argv, void *userdata) { in get_or_set_icon_name() argument 524 set_simple_string(userdata, "icon", "SetIconName", argv[1]); in get_or_set_icon_name() 527 static int get_or_set_chassis(int argc, char **argv, void *userdata) { in get_or_set_chassis() argument 529 set_simple_string(userdata, "chassis", "SetChassis", argv[1]); in get_or_set_chassis() 532 static int get_or_set_deployment(int argc, char **argv, void *userdata) { in get_or_set_deployment() argument [all …]
|
/systemd-251/src/portable/ |
D | portablectl.c | 300 static int inspect_image(int argc, char *argv[], void *userdata) { in inspect_image() argument 311 r = determine_image(argv[1], false, &image); in inspect_image() 315 r = determine_matches(argv[1], argv + 2, true, &matches); in inspect_image() 752 static int maybe_stop_disable(sd_bus *bus, char *image, char *argv[]) { in maybe_stop_disable() argument 761 r = determine_matches(argv[1], argv + 2, true, &matches); in maybe_stop_disable() 825 static int attach_reattach_image(int argc, char *argv[], const char *method) { in attach_reattach_image() argument 836 r = determine_image(argv[1], false, &image); in attach_reattach_image() 840 r = determine_matches(argv[1], argv + 2, false, &matches); in attach_reattach_image() 898 static int attach_image(int argc, char *argv[], void *userdata) { in attach_image() argument 899 …return attach_reattach_image(argc, argv, strv_isempty(arg_extension_images) ? "AttachImage" : "Att… in attach_image() [all …]
|
/systemd-251/src/creds/ |
D | creds.c | 198 static int verb_list(int argc, char **argv, void *userdata) { in verb_list() argument 361 static int verb_cat(int argc, char **argv, void *userdata) { in verb_cat() argument 367 STRV_FOREACH(cn, strv_skip(argv, 1)) { in verb_cat() 439 static int verb_encrypt(int argc, char **argv, void *userdata) { in verb_encrypt() argument 451 input_path = empty_or_dash(argv[1]) ? NULL : argv[1]; in verb_encrypt() 462 output_path = empty_or_dash(argv[2]) ? NULL : argv[2]; in verb_encrypt() 532 static int verb_decrypt(int argc, char **argv, void *userdata) { in verb_decrypt() argument 544 input_path = empty_or_dash(argv[1]) ? NULL : argv[1]; in verb_decrypt() 547 …r = read_full_file_full(AT_FDCWD, argv[1], UINT64_MAX, CREDENTIAL_ENCRYPTED_SIZE_MAX, READ_FULL_FI… in verb_decrypt() 555 output_path = (argc < 3 || isempty(argv[2]) || streq(argv[2], "-")) ? NULL : argv[2]; in verb_decrypt() [all …]
|
/systemd-251/src/test/ |
D | test-chase-symlinks.c | 13 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 38 assert_se(argv); in parse_argv() 40 while ((c = getopt_long(argc, argv, "", options, NULL)) >= 0) in parse_argv() 47 , argv[0]); in parse_argv() 84 static int run(int argc, char **argv) { in run() argument 89 r = parse_argv(argc, argv); in run() 97 printf("%s ", argv[i]); in run() 100 r = chase_symlinks(argv[i], arg_root, arg_flags, &p, arg_open ? &fd : NULL); in run()
|
/systemd-251/src/oom/ |
D | oomctl.c | 15 static int help(int argc, char *argv[], void *userdata) { in help() argument 44 static int dump_state(int argc, char *argv[], void *userdata) { in dump_state() argument 77 static int parse_argv(int argc, char *argv[]) { in parse_argv() argument 93 assert(argv); in parse_argv() 95 while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) in parse_argv() 119 static int run(int argc, char* argv[]) { in run() argument 132 r = parse_argv(argc, argv); in run() 136 return dispatch_verb(argc, argv, verbs, NULL); in run()
|
/systemd-251/src/timedate/ |
D | timedatectl.c | 167 static int show_status(int argc, char **argv, void *userdata) { in show_status() argument 201 static int show_properties(int argc, char **argv, void *userdata) { in show_properties() argument 220 static int set_time(int argc, char **argv, void *userdata) { in set_time() argument 229 r = parse_timestamp(argv[1], &t); in set_time() 231 return log_error_errno(r, "Failed to parse time specification '%s': %m", argv[1]); in set_time() 246 static int set_timezone(int argc, char **argv, void *userdata) { in set_timezone() argument 253 …r = bus_call_method(bus, bus_timedate, "SetTimezone", &error, NULL, "sb", argv[1], arg_ask_passwor… in set_timezone() 260 static int set_local_rtc(int argc, char **argv, void *userdata) { in set_local_rtc() argument 267 b = parse_boolean(argv[1]); in set_local_rtc() 269 return log_error_errno(b, "Failed to parse local RTC setting '%s': %m", argv[1]); in set_local_rtc() [all …]
|
/systemd-251/src/resolve/ |
D | resolvectl.c | 706 static int verb_query(int argc, char **argv, void *userdata) { in verb_query() argument 711 STRV_FOREACH(p, argv + 1) { in verb_query() 718 STRV_FOREACH(p, argv + 1) { in verb_query() 917 static int verb_service(int argc, char **argv, void *userdata) { in verb_service() argument 921 return resolve_service(bus, NULL, NULL, argv[1]); in verb_service() 923 return resolve_service(bus, NULL, argv[1], argv[2]); in verb_service() 925 return resolve_service(bus, argv[1], argv[2], argv[3]); in verb_service() 975 static int verb_openpgp(int argc, char **argv, void *userdata) { in verb_openpgp() argument 979 STRV_FOREACH(p, argv + 1) { in verb_openpgp() 1024 static int verb_tlsa(int argc, char **argv, void *userdata) { in verb_tlsa() argument [all …]
|