summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-16 22:44:27 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-16 22:44:27 +0000
commitf6079c7003bd2f20e6754e931fd24434a0be5c87 (patch)
tree348004e352fd2f7cdfe989aadd5666ca65680476 /IntelFrameworkModulePkg
parentbfa084fad99cd91f5cc0ba897ca9030cc45134ac (diff)
downloadedk2-platforms-f6079c7003bd2f20e6754e931fd24434a0be5c87.tar.xz
IntelFrameworkModulePkg GenericBdsLib: Remove unwanted assert condition
If the call to SetVariable is to delete the variable, but the variable was not found, then we return EFI_SUCCESS rather than EFI_NOT_FOUND. Signed-off-by: jljusten Reviewed-by: jcarsey Reviewed-by: geekboy15a Reviewed-by: niruiyu git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11840 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
index 2add59c5ab..f86cadf25b 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -273,13 +273,17 @@ BdsLibUpdateConsoleVariable (
//
// Finally, Update the variable of the default console by NewDevicePath
//
+ DevicePathSize = GetDevicePathSize (NewDevicePath);
Status = gRT->SetVariable (
ConVarName,
&gEfiGlobalVariableGuid,
Attributes,
- GetDevicePathSize (NewDevicePath),
+ DevicePathSize,
NewDevicePath
);
+ if ((DevicePathSize == 0) && (Status == EFI_NOT_FOUND)) {
+ Status = EFI_SUCCESS;
+ }
ASSERT_EFI_ERROR (Status);
if (VarConsole == NewDevicePath) {
@@ -295,7 +299,7 @@ BdsLibUpdateConsoleVariable (
}
}
- return EFI_SUCCESS;
+ return Status;
}