From 3b895e69140aa265929871217df9d34e40bad3fe Mon Sep 17 00:00:00 2001 From: "Ian M." Date: Fri, 11 Sep 2026 05:14:00 +0000 Subject: core: file: Get boot volume Signed-off-by: Ian M. --- core/sboot.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core/sboot.c') diff --git a/core/sboot.c b/core/sboot.c index 1a3d7d1..5511ca4 100644 --- a/core/sboot.c +++ b/core/sboot.c @@ -8,12 +8,16 @@ #include #include #include +#include + +EFI_FILE_HANDLE gBootVolume; EFI_STATUS EFIAPI efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { BOOT_ENTRY Entry; + EFI_STATUS Status; InitializeLib(ImageHandle, SystemTable); @@ -25,6 +29,11 @@ efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) NULL ); + Status = FileGetVolume(ImageHandle, &gBootVolume); + if (EFI_ERROR(Status)) { + Hcf(); + } + Print( L"SBOOT %s - %d boot entrie(s)\n", SBOOT_VERSION, -- cgit v1.2.3