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.
This commit is contained in:
Lennart Poettering 2024-06-27 22:12:49 +02:00
parent fc02ea668f
commit 558b1600cf

View file

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