Allow to read XTLDR data from alternative arch-specific directory; this allows to prepare combined 32 & 64 bit disk
This commit is contained in:
@@ -123,6 +123,13 @@ BlpLoadConfiguration()
|
||||
/* Read data from configuration file */
|
||||
Status = BlpReadConfigFile(XTBL_LOADER_DIRECTORY_PATH, L"XTLDR.INI", &ConfigData);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to read config file, try with architecture specific directory */
|
||||
Status = BlpReadConfigFile(XTBL_ARCH_LOADER_DIRECTORY_PATH, L"XTLDR.INI", &ConfigData);
|
||||
}
|
||||
|
||||
/* Check if configuration was read successfully */
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load configuration */
|
||||
BlDebugPrint(L"Failed to load configuration file (FS0:/EFI/BOOT/XTLDR.INI)\n");
|
||||
|
@@ -133,11 +133,18 @@ BlLoadModule(IN PWCHAR ModuleName)
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Open XTLDR modules directory and close the FS immediately */
|
||||
/* Open XTLDR modules common directory */
|
||||
Status = FsHandle->Open(FsHandle, &DirHandle, XTBL_MODULES_DIRECTORY_PATH, EFI_FILE_MODE_READ, 0);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Modules directory not found, attempt to open XTLDR architecture specific modules directory */
|
||||
Status = FsHandle->Open(FsHandle, &DirHandle, XTBL_ARCH_MODULES_DIRECTORY_PATH, EFI_FILE_MODE_READ, 0);
|
||||
}
|
||||
|
||||
/* Close FS handle */
|
||||
FsHandle->Close(FsHandle);
|
||||
|
||||
/* Check if directory opened successfully */
|
||||
/* Check if modules directory opened successfully */
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open directory */
|
||||
|
Reference in New Issue
Block a user