From: Zbigniew Jędrzejewski-Szmek Date: Wed, 29 Apr 2026 10:01:30 +0000 (+0200) Subject: shared/options: add option_parser_get_help_table_ns() helper X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb0143f1ceb03f1b8f8437f5787d5d402a0d2dd1;p=thirdparty%2Fsystemd.git shared/options: add option_parser_get_help_table_ns() helper It'll be used in the next commit. --- diff --git a/src/run/run.c b/src/run/run.c index ce35b48fba4..5827d91e1f9 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -188,7 +188,7 @@ static int help_sudo_mode(void) { * sudo's short switches, hence please do not introduce new short switches unless they have a roughly * equivalent purpose on sudo. Use long options for everything private to run0. */ - r = option_parser_get_help_table_full("run0", /* group= */ NULL, &opts_table); + r = option_parser_get_help_table_ns("run0", &opts_table); if (r < 0) return r; diff --git a/src/shared/options.h b/src/shared/options.h index 5f55dd5d19f..f50fbdb3cb3 100644 --- a/src/shared/options.h +++ b/src/shared/options.h @@ -236,6 +236,8 @@ int _option_parser_get_help_table_full( Table **ret); #define option_parser_get_help_table_full(namespace, group, ret) \ _option_parser_get_help_table_full(ALIGN_PTR(__start_SYSTEMD_OPTIONS), __stop_SYSTEMD_OPTIONS, namespace, group, ret) +#define option_parser_get_help_table_ns(ns, ret) \ + option_parser_get_help_table_full(ns, /* group= */ NULL, ret) #define option_parser_get_help_table_group(group, ret) \ option_parser_get_help_table_full(/* namespace= */ NULL, group, ret) #define option_parser_get_help_table(ret) \