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
This commit is contained in:
jljusten 2011-06-16 22:44:27 +00:00
parent bfa084fad9
commit f6079c7003
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}