]> git.ipfire.org Git - thirdparty/systemd.git/commit
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)
commit558b1600cfa42bf9c5786cd5af3f80c4c8498a3d
treed961d9f06e77a8201699205b24dffed8257889d7
parentfc02ea668fd2cde446e0f3dac417a96983f66ac7
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.
src/boot/efi/stub.c