]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg GenericBdsLib: Remove unwanted assert condition
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Jun 2011 22:44:27 +0000 (22:44 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Jun 2011 22:44:27 +0000 (22:44 +0000)
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

index 2add59c5ab22e2291a49ffc8efc041d1260303cc..f86cadf25b6fc81614b9961297323e3dc8faa773 100644 (file)
@@ -273,13 +273,17 @@ BdsLibUpdateConsoleVariable (
   //\r
   // Finally, Update the variable of the default console by NewDevicePath\r
   //\r
+  DevicePathSize = GetDevicePathSize (NewDevicePath);\r
   Status = gRT->SetVariable (\r
                   ConVarName,\r
                   &gEfiGlobalVariableGuid,\r
                   Attributes,\r
-                  GetDevicePathSize (NewDevicePath),\r
+                  DevicePathSize,\r
                   NewDevicePath\r
                   );\r
+  if ((DevicePathSize == 0) && (Status == EFI_NOT_FOUND)) {\r
+    Status = EFI_SUCCESS;\r
+  }\r
   ASSERT_EFI_ERROR (Status);\r
 \r
   if (VarConsole == NewDevicePath) {\r
@@ -295,7 +299,7 @@ BdsLibUpdateConsoleVariable (
     }\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
 \r
 }\r
 \r