| 282 | } |
| 283 | |
| 284 | BOOLEAN |
| 285 | IsDeletableVariable ( |
| 286 | IN CHAR16 *Name, |
| 287 | IN EFI_GUID *Guid |
| 288 | ) |
| 289 | { |
| 290 | // Apple GUIDs |
| 291 | if (CompareGuid(Guid, &gEfiAppleVendorGuid) || |
| 292 | CompareGuid(Guid, &gEfiAppleBootGuid) || |
| 293 | CompareGuid(Guid, &gAppleCoreStorageVariableGuid) || |
| 294 | CompareGuid(Guid, &gAppleTamperResistantBootVariableGuid) || |
| 295 | CompareGuid(Guid, &gAppleWirelessNetworkVariableGuid) || |
| 296 | CompareGuid(Guid, &gApplePersonalizationVariableGuid) || |
| 297 | CompareGuid(Guid, &gAppleNetbootVariableGuid) || |
| 298 | CompareGuid(Guid, &gAppleSecureBootVariableGuid) || |
| 299 | CompareGuid(Guid, &gAppleTamperResistantBootSecureVariableGuid) || |
| 300 | CompareGuid(Guid, &gAppleTamperResistantBootEfiUserVariableGuid)) { |
| 301 | return TRUE; |
| 302 | |
| 303 | // Disable Clover Boot Options from being deleted |
| 304 | // Global variable boot options |
| 305 | /*} else if (CompareGuid (Guid, &gEfiGlobalVariableGuid)) { |
| 306 | // Only erase boot and driver entries for BDS |
| 307 | // I.e. BootOrder, Boot####, DriverOrder, Driver#### |
| 308 | if (!StrnCmp (Name, L"Boot", StrLen(L"Boot")) || |
| 309 | !StrnCmp (Name, L"Driver", StrLen(L"Driver"))) { |
| 310 | return TRUE; |
| 311 | }*/ |
| 312 | |
| 313 | // Lilu / OpenCore extensions |
| 314 | } else if (CompareGuid (Guid, &gOcVendorVariableGuid) || |
| 315 | CompareGuid(Guid, &gOcReadOnlyVariableGuid) || |
| 316 | CompareGuid(Guid, &gOcWriteOnlyVariableGuid)) { |
| 317 | return TRUE; |
| 318 | |
| 319 | // Ozmozis extensions |
| 320 | } else if (CompareGuid (Guid, &mOzmosisProprietary1Guid) || |
| 321 | CompareGuid (Guid, &mOzmosisProprietary2Guid)) { |
| 322 | return TRUE; |
| 323 | |
| 324 | // BootChime |
| 325 | } else if (CompareGuid (Guid, &gBootChimeVendorVariableGuid)) { |
| 326 | return TRUE; |
| 327 | } |
| 328 | |
| 329 | return FALSE; |
| 330 | } |
| 331 | |
| 332 | // Reset Native NVRAM by vit9696, reworked and implemented by Sherlocks |
| 333 | EFI_STATUS |
no test coverage detected