From fc3d23640510b3ea0d061988932ade01141e5c36 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sun, 31 Dec 2023 00:30:18 +0100 Subject: [PATCH] Load boot loader modules --- xtldr2/xtldr.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xtldr2/xtldr.c b/xtldr2/xtldr.c index 921104c..4d8895a 100644 --- a/xtldr2/xtldr.c +++ b/xtldr2/xtldr.c @@ -300,6 +300,15 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, return Status; } + /* Load boot loader modules */ + Status = BlLoadModules(BlGetConfigValue(L"MODULES")); + if(Status != STATUS_EFI_SUCCESS) + { + /* Failed to load modules */ + BlDebugPrint(L"ERROR: Failed to load XTLDR modules (Status Code: 0x%lx)\n", Status); + BlDisplayErrorDialog(L"XTLDR", L"Failed to load some XTLDR modules."); + } + /* Discover and enumerate EFI block devices */ Status = BlEnumerateBlockDevices(); if(Status != STATUS_EFI_SUCCESS) @@ -309,10 +318,6 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, return Status; } - BlLoadModules(BlGetConfigValue(L"MODULES")); - - BlLoadModule(L"DUMMY"); - BlConsolePrint(L"\n\n\n\n\n\n\n\nList of loaded modules:"); PLIST_ENTRY ModuleListEntry;