From f6079c7003bd2f20e6754e931fd24434a0be5c87 Mon Sep 17 00:00:00 2001 From: jljusten Date: Thu, 16 Jun 2011 22:44:27 +0000 Subject: 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 --- IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'IntelFrameworkModulePkg') 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; } -- cgit v1.2.3