]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: set arguments directly
authorDavid Tardon <dtardon@redhat.com>
Wed, 1 Oct 2025 17:24:05 +0000 (19:24 +0200)
committerDavid Tardon <dtardon@redhat.com>
Thu, 2 Oct 2025 14:19:03 +0000 (16:19 +0200)
There's no point in going through handle_arg_console() now that all the
checks have been moved out of it.

src/nspawn/nspawn.c

index 25af8520e23158501b4fca5e1d94bcc1e201779a..0b01dbc450e81d1c3f88b347f79e2baeeb222e3a 100644 (file)
@@ -1478,9 +1478,8 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case 'P':
                 case ARG_PIPE:
-                        r = handle_arg_console("pipe");
-                        if (r <= 0)
-                                return r;
+                        arg_console_mode = CONSOLE_PIPE;
+                        arg_settings_mask |= SETTING_CONSOLE_MODE;
                         break;
 
                 case ARG_NO_PAGER: