From fb0143f1ceb03f1b8f8437f5787d5d402a0d2dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 29 Apr 2026 12:01:30 +0200 Subject: [PATCH] shared/options: add option_parser_get_help_table_ns() helper It'll be used in the next commit. --- src/run/run.c | 2 +- src/shared/options.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/run/run.c b/src/run/run.c index ce35b48fba..5827d91e1f 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 5f55dd5d19..f50fbdb3cb 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) \