efi: share setting of generic efivars between sd-stub/sd-boot
authorLennart Poettering <lennart@poettering.net>
Wed, 26 Jun 2024 13:18:57 +0000 (15:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Jun 2024 15:09:45 +0000 (17:09 +0200)
commit506ffa0e72613542a1d96b4b98fa52f7f18cf7f8
tree98def7dec59e6bb12562462179a0192c6504c6dd
parent75d08dc6e8e4e200cceed1ac904c307c665d1dd7
efi: share setting of generic efivars between sd-stub/sd-boot

We have very similar code for setting generic efi vars in sd-stub and
sd-boot. Let's share it.

This changes behaviour in a minor way: if you chainload multiple
versions of an sd-boot you'll see the efi vars of the first one now in
the OS, not of the last one.

But this should not matter, invocation like that should generally not
happen.
src/boot/efi/boot.c
src/boot/efi/export-vars.c [new file with mode: 0644]
src/boot/efi/export-vars.h [new file with mode: 0644]
src/boot/efi/meson.build
src/boot/efi/stub.c