diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-16 22:44:27 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-16 22:44:27 +0000 |
commit | f6079c7003bd2f20e6754e931fd24434a0be5c87 (patch) | |
tree | 348004e352fd2f7cdfe989aadd5666ca65680476 | |
parent | bfa084fad99cd91f5cc0ba897ca9030cc45134ac (diff) | |
download | edk2-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
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c | 8 |
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;
}
|