diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c index 4398f40e72..dfd00e4b0d 100644 --- a/src/udev/udevadm-settle.c +++ b/src/udev/udevadm-settle.c @@ -8,13 +8,12 @@ #include "sd-bus.h" #include "sd-event.h" +#include "sd-json.h" #include "sd-login.h" #include "sd-messages.h" #include "alloc-util.h" #include "bus-util.h" -#include "format-table.h" -#include "help-util.h" #include "options.h" #include "path-util.h" #include "string-util.h" @@ -24,30 +23,12 @@ #include "udevadm.h" #include "udevadm-util.h" #include "unit-def.h" +#include "verbs.h" #include "virt.h" static usec_t arg_timeout_usec = 120 * USEC_PER_SEC; static const char *arg_exists = NULL; -static int help(void) { - _cleanup_(table_unrefp) Table *options = NULL; - int r; - - r = option_parser_get_help_table_ns("udevadm-settle", &options); - if (r < 0) - return r; - - help_cmdline("settle [OPTIONS]"); - help_abstract("Wait for pending udev events."); - help_section("Options"); - r = table_print_or_warn(options); - if (r < 0) - return r; - - help_man_page_reference("udevadm", "8"); - return 0; -} - static int parse_argv(int argc, char *argv[]) { int r; @@ -62,7 +43,7 @@ static int parse_argv(int argc, char *argv[]) { OPTION_NAMESPACE("udevadm-settle"): {} OPTION_COMMON_HELP: - return help(); + return command_print_verb_help("settle"); OPTION('V', "version", NULL, "Show package version"): return print_version(); @@ -86,6 +67,9 @@ static int parse_argv(int argc, char *argv[]) { return log_info_errno(SYNTHETIC_ERRNO(EINVAL), "Option -%c no longer supported.", opts.opt->short_code); + + OPTION_COMMON_INTROSPECT_CLI: + return introspect_cli(SD_JSON_FORMAT_OFF); } if (option_parser_get_n_args(&opts) > 0)