summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c8
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;
}