summaryrefslogtreecommitdiff
path: root/core/sboot.c
diff options
context:
space:
mode:
authorIan M. <ian@aptel.org>2026-09-11 05:14:00 +0000
committerIan M. <ian@aptel.org>2026-09-11 05:14:00 +0000
commit3b895e69140aa265929871217df9d34e40bad3fe (patch)
tree2690ddde952423e4e294f91374615e8369dedfa5 /core/sboot.c
parentff0e017888dbbafd9a29f21b4be0c51494725d5b (diff)
core: file: Get boot volume
Signed-off-by: Ian M. <ian@aptel.org>
Diffstat (limited to 'core/sboot.c')
-rw-r--r--core/sboot.c9
1 files changed, 9 insertions, 0 deletions
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 <sboot/sboot.h>
#include <sboot/config.h>
#include <sboot/fwi.h>
+#include <sboot/file.h>
+
+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,