]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
stub: don't mangle command line if we got it as array
authorLennart Poettering <lennart@poettering.net>
Thu, 27 Jun 2024 20:12:49 +0000 (22:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 28 Jun 2024 07:58:24 +0000 (09:58 +0200)
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.

src/boot/efi/stub.c

index f31aecfa63db823ba9c4228b78e5c04810e85dfa..925639f908ef2b60f2c7dbf1c4488b05d1792f1a 100644 (file)
@@ -204,7 +204,6 @@ static bool use_load_options(
                 *ret = xasprintf("%ls %ls", old, shell->Argv[i]);
         }
 
-        mangle_stub_cmdline(*ret);
         return true;
 }