summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-03-14 14:37:55 +0800
committerFeng Tian <feng.tian@intel.com>2016-03-16 10:41:25 +0800
commitc7d310dd169ef84eee1ffab3af763372a363ab4b (patch)
tree5e44a55e5b67a18b84fd76d0d7c85e667323a807 /MdeModulePkg/Library
parent41c244b6b992aa39086ab258f4383c8daf85c3b3 (diff)
downloadedk2-platforms-c7d310dd169ef84eee1ffab3af763372a363ab4b.tar.xz
MdeModulePkg: Refine the UI code
Remove the ASSERT in UI code that may be triggered, and clean up the useless code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c15
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h10
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c56
3 files changed, 12 insertions, 69 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
index 8189bd1084..745f971554 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
@@ -1,7 +1,7 @@
/** @file
The functions for Boot Maintainence Main menu.
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -667,8 +667,17 @@ BootMaintRouteConfig (
sizeof(UINT16),
&(NewBmmData->BootTimeOut)
);
- ASSERT_EFI_ERROR(Status);
-
+ if (EFI_ERROR (Status)) {
+ //
+ // If set variable fail, and don't have the appropriate error status for RouteConfig fuction to return,
+ // just return the EFI_NOT_FOUND.
+ //
+ if (Status == EFI_OUT_OF_RESOURCES) {
+ return Status;
+ } else {
+ return EFI_NOT_FOUND;
+ }
+ }
Private->BmmOldFakeNVData.BootTimeOut = NewBmmData->BootTimeOut;
}
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h
index b482bf2892..2c93446a05 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h
@@ -764,16 +764,6 @@ Var_UpdateOutOfBandOption (
);
/**
- Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits,
- parity and stop Bits set.
-
-**/
-VOID
-Var_UpdateAllConsoleOption (
- VOID
- );
-
-/**
This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,
this EFI Variable is deleted.
It also update the BMM context data specified the "BootNext" value.
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
index 2ecf5b6605..b65d6a5c9e 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c
@@ -301,62 +301,6 @@ Var_ChangeDriverOrder (
}
/**
- Update the device path of "ConOut", "ConIn" and "ErrOut"
- based on the new BaudRate, Data Bits, parity and Stop Bits
- set.
-
-**/
-VOID
-Var_UpdateAllConsoleOption (
- VOID
- )
-{
- EFI_DEVICE_PATH_PROTOCOL *OutDevicePath;
- EFI_DEVICE_PATH_PROTOCOL *InpDevicePath;
- EFI_DEVICE_PATH_PROTOCOL *ErrDevicePath;
- EFI_STATUS Status;
-
- GetEfiGlobalVariable2 (L"ConOut", (VOID**)&OutDevicePath, NULL);
- GetEfiGlobalVariable2 (L"ConIn", (VOID**)&InpDevicePath, NULL);
- GetEfiGlobalVariable2 (L"ErrOut", (VOID**)&ErrDevicePath, NULL);
- if (OutDevicePath != NULL) {
- ChangeVariableDevicePath (OutDevicePath);
- Status = gRT->SetVariable (
- L"ConOut",
- &gEfiGlobalVariableGuid,
- VAR_FLAG,
- GetDevicePathSize (OutDevicePath),
- OutDevicePath
- );
- ASSERT (!EFI_ERROR (Status));
- }
-
- if (InpDevicePath != NULL) {
- ChangeVariableDevicePath (InpDevicePath);
- Status = gRT->SetVariable (
- L"ConIn",
- &gEfiGlobalVariableGuid,
- VAR_FLAG,
- GetDevicePathSize (InpDevicePath),
- InpDevicePath
- );
- ASSERT (!EFI_ERROR (Status));
- }
-
- if (ErrDevicePath != NULL) {
- ChangeVariableDevicePath (ErrDevicePath);
- Status = gRT->SetVariable (
- L"ErrOut",
- &gEfiGlobalVariableGuid,
- VAR_FLAG,
- GetDevicePathSize (ErrDevicePath),
- ErrDevicePath
- );
- ASSERT (!EFI_ERROR (Status));
- }
-}
-
-/**
This function delete and build multi-instance device path for
specified type of console device.