From 90e3ccadd36f2bf69f52ed6a6afab39d3972574d Mon Sep 17 00:00:00 2001 From: vit9696 Date: Fri, 7 May 2021 10:27:50 +0300 Subject: [PATCH] OcBootManagementLib: Fixed NVRAM reset with some write-protected vars --- Changelog.md | 3 +++ Library/OcBootManagementLib/VariableManagement.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 0c248a4d..13180af8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ OpenCore Changelog ================== +#### v0.7.0 +- Fixed NVRAM reset on firmware with write-protected `BootOptionSupport` + #### v0.6.9 - Fixed out-of-sync cursor movement rectangle when loading e.g. CrScreenshotDxe - Updated underlying EDK II package to edk2-stable202102 diff --git a/Library/OcBootManagementLib/VariableManagement.c b/Library/OcBootManagementLib/VariableManagement.c index 77aa3452..7b4c5afa 100644 --- a/Library/OcBootManagementLib/VariableManagement.c +++ b/Library/OcBootManagementLib/VariableManagement.c @@ -80,7 +80,8 @@ IsDeletableVariable ( // Only erase boot and driver entries for BDS // I.e. BootOrder, Boot####, DriverOrder, Driver#### // - if (StrnCmp (Name, L"Boot", StrLen(L"Boot")) == 0 + if ((StrnCmp (Name, L"Boot", StrLen(L"Boot")) == 0 + && StrCmp (Name, L"BootOptionSupport") != 0) || StrnCmp (Name, L"Driver", StrLen(L"Driver")) == 0) { return TRUE; } -- GitLab