stub: don't override LoaderDevicePartUUID EFI var
authorLennart Poettering <lennart@poettering.net>
Fri, 8 Feb 2019 15:51:58 +0000 (16:51 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Mar 2019 11:41:32 +0000 (12:41 +0100)
commitc8b32d06bd4729bc48628873e35d2769d08f3575
treed06bccd51f730a8c4faf0e72be32eeb2295e5aaa
parent8118fb3c83bc813976e9fb4984bc80b13798d2a1
stub: don't override LoaderDevicePartUUID EFI var

We document and all our code assumes that LoaderDevicePartUUID is
initialized to the ESP's UUID. Let's hence not override the variable if
it is already set, in order to not confuse userspace if the kernel's EFI
image is run from a different partition than the ESP.

This matches behaviour for all other variables set by the EFI stub, in
particular the closely related LoaderImageIdentifier variable.
src/boot/efi/stub.c