mirror of https://github.com/acidanthera/audk.git
MdeModulePkg: Update UiApp to not display itself
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18657 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
26da0b64df
commit
d4bf294e0e
|
@ -219,7 +219,9 @@ EnumerateBootOptions (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath;
|
||||||
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
|
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
|
||||||
UINTN BootOptionCount;
|
UINTN BootOptionCount;
|
||||||
EFI_STRING_ID Token;
|
EFI_STRING_ID Token;
|
||||||
|
@ -240,6 +242,9 @@ EnumerateBootOptions (
|
||||||
|
|
||||||
DeviceType = (UINT16) -1;
|
DeviceType = (UINT16) -1;
|
||||||
|
|
||||||
|
Status = gBS->HandleProtocol (gImageHandle, &gEfiLoadedImageDevicePathProtocolGuid, (VOID **) &ImageDevicePath);
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
//
|
//
|
||||||
// for better user experience
|
// for better user experience
|
||||||
// 1. User changes HD configuration (e.g.: unplug HDD), here we have a chance to remove the HDD boot option
|
// 1. User changes HD configuration (e.g.: unplug HDD), here we have a chance to remove the HDD boot option
|
||||||
|
@ -289,6 +294,13 @@ EnumerateBootOptions (
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Don't display myself
|
||||||
|
//
|
||||||
|
if (CompareMem (BootOption[Index].FilePath, ImageDevicePath, GetDevicePathSize (ImageDevicePath)) == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Group the legacy boot option in the sub title created dynamically
|
// Group the legacy boot option in the sub title created dynamically
|
||||||
//
|
//
|
||||||
|
|
|
@ -30,6 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Guid/HiiBootMaintenanceFormset.h>
|
#include <Guid/HiiBootMaintenanceFormset.h>
|
||||||
|
|
||||||
#include <Protocol/LoadFile.h>
|
#include <Protocol/LoadFile.h>
|
||||||
|
#include <Protocol/LoadedImage.h>
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
#include <Protocol/HiiConfigRouting.h>
|
#include <Protocol/HiiConfigRouting.h>
|
||||||
#include <Protocol/Smbios.h>
|
#include <Protocol/Smbios.h>
|
||||||
|
|
|
@ -123,6 +123,7 @@
|
||||||
gEfiPciIoProtocolGuid ## CONSUMES
|
gEfiPciIoProtocolGuid ## CONSUMES
|
||||||
gEfiDevicePathToTextProtocolGuid ## CONSUMES
|
gEfiDevicePathToTextProtocolGuid ## CONSUMES
|
||||||
gEfiBootLogoProtocolGuid ## CONSUMES
|
gEfiBootLogoProtocolGuid ## CONSUMES
|
||||||
|
gEfiLoadedImageDevicePathProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue