mirror of https://github.com/acidanthera/audk.git
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:
parent
bfa084fad9
commit
f6079c7003
|
@ -273,13 +273,17 @@ BdsLibUpdateConsoleVariable (
|
||||||
//
|
//
|
||||||
// Finally, Update the variable of the default console by NewDevicePath
|
// Finally, Update the variable of the default console by NewDevicePath
|
||||||
//
|
//
|
||||||
|
DevicePathSize = GetDevicePathSize (NewDevicePath);
|
||||||
Status = gRT->SetVariable (
|
Status = gRT->SetVariable (
|
||||||
ConVarName,
|
ConVarName,
|
||||||
&gEfiGlobalVariableGuid,
|
&gEfiGlobalVariableGuid,
|
||||||
Attributes,
|
Attributes,
|
||||||
GetDevicePathSize (NewDevicePath),
|
DevicePathSize,
|
||||||
NewDevicePath
|
NewDevicePath
|
||||||
);
|
);
|
||||||
|
if ((DevicePathSize == 0) && (Status == EFI_NOT_FOUND)) {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
}
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
if (VarConsole == NewDevicePath) {
|
if (VarConsole == NewDevicePath) {
|
||||||
|
@ -295,7 +299,7 @@ BdsLibUpdateConsoleVariable (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue