]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: exit with option --json=help (#39974) main
authorAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Tue, 2 Dec 2025 16:56:01 +0000 (17:56 +0100)
committerGitHub <noreply@github.com>
Tue, 2 Dec 2025 16:56:01 +0000 (01:56 +0900)
In that case, `parse_json_argument()` returns 0.

Follow-up for bdd36c003d9c4c4ca89c92be504615378f61513c (v255).

src/kernel-install/kernel-install.c

index 97c4b3a352bc271b599a7a57f207eb39f5f9de86..27cfa089089d903a54656464366ba5df575b52ba 100644 (file)
@@ -1621,7 +1621,7 @@ static int parse_argv(int argc, char *argv[], Context *c) {
 
                 case ARG_JSON:
                         r = parse_json_argument(optarg, &arg_json_format_flags);
-                        if (r < 0)
+                        if (r <= 0)
                                 return r;
                         break;