mirror of
https://github.com/systemd/systemd.git
synced 2026-07-16 04:20:34 +00:00
EFI stub: add StubInfo if non-existant
currently if a stub image is directly booted, bootctl reports:
```
Current Loader:
Product: n/a
ESP: /dev/disk/by-partuuid/b0a0807d-0592-40e9-adac-3bb724e9e305
File: └─/EFI/Secure/secure-boot-4.14.8+.efi
```
Let's add a StubInfo which will be displayed by bootctl too (in a later
patch).
This commit is contained in:
@@ -124,6 +124,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
|
||||
FreePool(loader_firmware_type);
|
||||
}
|
||||
|
||||
/* add StubInfo */
|
||||
if (efivar_get_raw(&global_guid, L"StubInfo", &b, &size) != EFI_SUCCESS)
|
||||
efivar_set(L"StubInfo", L"systemd-stub " PACKAGE_VERSION, FALSE);
|
||||
|
||||
if (szs[3] > 0)
|
||||
graphics_splash((UINT8 *)((UINTN)loaded_image->ImageBase + addrs[3]), szs[3], NULL);
|
||||
|
||||
Reference in New Issue
Block a user