From: Lennart Poettering Date: Thu, 27 Jun 2024 20:12:49 +0000 (+0200) Subject: stub: don't mangle command line if we got it as array X-Git-Tag: v257-rc1~1025^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=558b1600cfa42bf9c5786cd5af3f80c4c8498a3d;p=thirdparty%2Fsystemd.git stub: don't mangle command line if we got it as array There are two ways to get the command line: from the EFI shell, preparsed, already split at whitespace. This we just combine with spaces, since kernel wants it as one string. And as one command line blob which is how we are invoked otherwise and which comes with all kinds of whitespace quite likely. Let's only strip leading and trailing whitespace in the latter case, given it's likely the concatenation of whitespace separated strings generated by shell scripts and such. But let's not strip it we already received a preparsed array. --- diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index f31aecfa63d..925639f908e 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -204,7 +204,6 @@ static bool use_load_options( *ret = xasprintf("%ls %ls", old, shell->Argv[i]); } - mangle_stub_cmdline(*ret); return true; }