From aa9bd2c140ff39a5041e63479f4853bbd4693e4f Mon Sep 17 00:00:00 2001
From: srs5694
Date: Mon, 23 Nov 2015 10:09:47 -0500
Subject: [PATCH] Fix bug that caused rEFInd to fail to scan EFI boot loaders
with the fallback filename when rEFInd was launched from the fallback
filename on another disk.
---
NEWS.txt | 4 ++++
docs/refind/index.html | 2 ++
refind/main.c | 6 +++---
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/NEWS.txt b/NEWS.txt
index 661acec..25014ce 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,10 @@
0.10.1 (??/??/201?):
--------------------
+- Fixed bug that caused rEFInd to fail to scan EFI boot loaders on
+ removable media when rEFInd itself was launched from the fallback
+ filename.
+
- Moved detailed descriptions of refind-install from installing.html to
a refind-install man page. To keep this information Web-accessible, I've
also created HTML versions of the three man pages and linked them into
diff --git a/docs/refind/index.html b/docs/refind/index.html
index d26bdd4..43e3bc6 100644
--- a/docs/refind/index.html
+++ b/docs/refind/index.html
@@ -182,6 +182,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com
The Future of rEFInd—Current bugs that need squashing and features that I hope to one day add
+
+
Manual (man) pages for rEFInd support scripts:
diff --git a/refind/main.c b/refind/main.c
index ba3368b..e98719f 100644
--- a/refind/main.c
+++ b/refind/main.c
@@ -2075,9 +2075,9 @@ static VOID RescanAll(BOOLEAN DisplayMessage) {
FreeList((VOID ***) &(MainMenu.Entries), &MainMenu.EntryCount);
MainMenu.Entries = NULL;
MainMenu.EntryCount = 0;
- ReadConfig(GlobalConfig.ConfigFilename);
ConnectAllDriversToAllControllers();
ScanVolumes();
+ ReadConfig(GlobalConfig.ConfigFilename);
ScanForBootloaders();
ScanForTools();
SetupScreen();
@@ -2190,6 +2190,8 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
if (GlobalConfig.LegacyType == LEGACY_TYPE_MAC)
CopyMem(GlobalConfig.ScanFor, "ihebocm ", NUM_SCAN_OPTIONS);
SetConfigFilename(ImageHandle);
+ LoadDrivers();
+ ScanVolumes(); // Do before ReadConfig() because it needs SelfVolume->VolName
ReadConfig(GlobalConfig.ConfigFilename);
if (GlobalConfig.SpoofOSXVersion && GlobalConfig.SpoofOSXVersion[0] != L'\0')
@@ -2204,8 +2206,6 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
// further bootstrap (now with config available)
MokProtocol = SecureBootSetup();
- LoadDrivers();
- ScanVolumes();
ScanForBootloaders();
ScanForTools();
SetupScreen();
--
2.39.2