From cbfbc3487f91adce014d11ffdc29051e95ccc0c4 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Wed, 29 Apr 2020 05:14:06 +0300 Subject: [PATCH] OpenCoreMisc: Fix excluded handled initialisation --- Library/OcBootManagementLib/BootEntryInfo.c | 1 + Library/OcBootManagementLib/BootEntryManagement.c | 2 +- Platform/OpenCore/OpenCoreMisc.c | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Library/OcBootManagementLib/BootEntryInfo.c b/Library/OcBootManagementLib/BootEntryInfo.c index 9be58cd4..318074d1 100644 --- a/Library/OcBootManagementLib/BootEntryInfo.c +++ b/Library/OcBootManagementLib/BootEntryInfo.c @@ -405,6 +405,7 @@ InternalPrepareScanInfo ( ); } } else { + DEBUG ((DEBUG_INFO, "OCB: Skipping loaded handle %p %p\n", Context->ExcludeHandle, DevPathScanInfo->Device)); Status = EFI_UNSUPPORTED; } diff --git a/Library/OcBootManagementLib/BootEntryManagement.c b/Library/OcBootManagementLib/BootEntryManagement.c index b9fbe2bf..c6df6315 100644 --- a/Library/OcBootManagementLib/BootEntryManagement.c +++ b/Library/OcBootManagementLib/BootEntryManagement.c @@ -528,7 +528,7 @@ OcScanForBootEntries ( if (Index < Context->AbsoluteEntryCount) { DEBUG (( DEBUG_INFO, - "OCB: Custom entry %u is %a\n", + "OCB: Custom entry %u is %s\n", (UINT32) EntryIndex, Entries[EntryIndex].Name )); diff --git a/Platform/OpenCore/OpenCoreMisc.c b/Platform/OpenCore/OpenCoreMisc.c index afacf308..dd64d1ae 100644 --- a/Platform/OpenCore/OpenCoreMisc.c +++ b/Platform/OpenCore/OpenCoreMisc.c @@ -480,8 +480,12 @@ OcMiscLateInit ( // // Do not disclose self entry unless asked. // - if (LoadHandle != NULL && Config->Misc.Boot.HideSelf) { - *LoadHandle = OcHandle; + if (LoadHandle != NULL) { + if (Config->Misc.Boot.HideSelf) { + *LoadHandle = OcHandle; + } else { + *LoadHandle = NULL; + } } HibernateMode = OC_BLOB_GET (&Config->Misc.Boot.HibernateMode);