From 30aad505f12dc4f0d894eac24cd7983e5b87938c Mon Sep 17 00:00:00 2001 From: vit9696 Date: Tue, 12 May 2020 22:44:52 +0300 Subject: [PATCH] OcBootManagementLib: Fix hiding Time Machine entries with HideAuxiliary --- Library/OcBootManagementLib/BootEntryManagement.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/OcBootManagementLib/BootEntryManagement.c b/Library/OcBootManagementLib/BootEntryManagement.c index 4cfe9337..1455be0d 100644 --- a/Library/OcBootManagementLib/BootEntryManagement.c +++ b/Library/OcBootManagementLib/BootEntryManagement.c @@ -379,6 +379,14 @@ AddBootEntryOnFileSystem ( return EFI_UNSUPPORTED; } + // + // Do not add Time Machine when not requested. + // + if (BootContext->PickerContext->HideAuxiliary && EntryType == OC_BOOT_APPLE_TIME_MACHINE) { + DEBUG ((DEBUG_INFO, "OCB: Discarding time machine entry due to auxiliary\n")); + return EFI_UNSUPPORTED; + } + // // Skip OpenCore bootloaders on own entry. // We do not waste time doing this for other entries.