summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorHarry Liebel <Harry.Liebel@arm.com>2014-09-09 15:58:33 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-09 15:58:33 +0000
commitc41bffd3805f6bd4cbe817c969d21485040f1e3a (patch)
treec2459dffa194dc675200bb49839752f8d0770c16 /ArmPlatformPkg
parent01289ec36fc530aebefa38085655d1d656b3339f (diff)
downloadedk2-platforms-c41bffd3805f6bd4cbe817c969d21485040f1e3a.tar.xz
ArmPlatformPkg/Bds: Fix delete boot option
- We need to delete the boot option variable from storage not just adjust the BootOrder variable. - The Linux tool 'efibootmgr' still showed the previously removed boot options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16070 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Bds/BootOption.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c
index 8ed636b53b..5712d2ccb4 100644
--- a/ArmPlatformPkg/Bds/BootOption.c
+++ b/ArmPlatformPkg/Bds/BootOption.c
@@ -367,6 +367,7 @@ BootOptionDelete (
UINTN BootOrderSize;
UINT16* BootOrder;
UINTN BootOrderCount;
+ CHAR16 BootVariableName[9];
EFI_STATUS Status;
// Remove the entry from the BootOrder environment variable
@@ -399,7 +400,17 @@ BootOptionDelete (
);
}
+ // Delete Boot#### environment variable
+ UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOption->LoadOptionIndex);
+ Status = gRT->SetVariable (
+ BootVariableName,
+ &gEfiGlobalVariableGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ 0,
+ NULL
+ );
+
FreePool (BootOrder);
- return EFI_SUCCESS;
+ return Status;
}