mirror of https://github.com/acidanthera/audk.git
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:
parent
41c244b6b9
commit
c7d310dd16
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
FrontPage routines to handle the callbacks and browser calls
|
FrontPage routines to handle the callbacks and browser calls
|
||||||
|
|
||||||
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -420,7 +420,10 @@ FrontPageCallback (
|
||||||
AsciiStrSize (Lang),
|
AsciiStrSize (Lang),
|
||||||
Lang
|
Lang
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
if (EFI_ERROR (Status)) {
|
||||||
|
FreePool (Lang);
|
||||||
|
return EFI_DEVICE_ERROR;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ASSERT (FALSE);
|
ASSERT (FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
The functions for Boot Maintainence Main menu.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -667,8 +667,17 @@ BootMaintRouteConfig (
|
||||||
sizeof(UINT16),
|
sizeof(UINT16),
|
||||||
&(NewBmmData->BootTimeOut)
|
&(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;
|
Private->BmmOldFakeNVData.BootTimeOut = NewBmmData->BootTimeOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -763,16 +763,6 @@ Var_UpdateOutOfBandOption (
|
||||||
IN UINT16 MenuIndex
|
IN UINT16 MenuIndex
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
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 function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,
|
||||||
this EFI Variable is deleted.
|
this EFI Variable is deleted.
|
||||||
|
|
|
@ -300,62 +300,6 @@ Var_ChangeDriverOrder (
|
||||||
return EFI_SUCCESS;
|
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
|
This function delete and build multi-instance device path for
|
||||||
specified type of console device.
|
specified type of console device.
|
||||||
|
|
Loading…
Reference in New Issue