From: David Tardon Date: Thu, 2 Oct 2025 13:57:10 +0000 (+0200) Subject: userdbctl: require value for --output= X-Git-Tag: v259-rc1~386^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5fada5d5da0152143161762a35c7e53b5ff1947;p=thirdparty%2Fsystemd.git userdbctl: require value for --output= Currently, when --output= is used with empty string, it resets the mode. E.g., # userdbctl user --output=json --output= ... will use the default output mode, not JSON. But that functionality is not documented and it seems to be of little practical use. Let's just drop it. --- diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c index 9959869e7af..da3901a07eb 100644 --- a/src/userdb/userdbctl.c +++ b/src/userdb/userdbctl.c @@ -1652,9 +1652,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_OUTPUT: - if (isempty(optarg)) - arg_output = _OUTPUT_INVALID; - else if (streq(optarg, "classic")) + if (streq(optarg, "classic")) arg_output = OUTPUT_CLASSIC; else if (streq(optarg, "friendly")) arg_output = OUTPUT_FRIENDLY;