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>
This commit is contained in:
@@ -300,62 +300,6 @@ Var_ChangeDriverOrder (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
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.
|
||||
|
Reference in New Issue
Block a user