Revision: 18804
http://sourceforge.net/p/edk2/code/18804
Author: vanjeff
Date: 2015-11-16 08:02:59 +0000 (Mon, 16 Nov 2015)
Log Message:
-----------
MdeModulePkg: Update BootManagerMenuApp to not display itself
(Sync patch r18656 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/18656
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
Modified:
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
===================================================================
---
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
2015-11-16 08:02:03 UTC (rev 18803)
+++
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c
2015-11-16 08:02:59 UTC (rev 18804)
@@ -262,13 +262,18 @@
OUT BOOT_MENU_POPUP_DATA *BootMenuData
)
{
+ EFI_STATUS Status;
UINTN Index;
UINTN StrIndex;
+ EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath;
if (BootOption == NULL || BootMenuData == NULL) {
return EFI_INVALID_PARAMETER;
- }
-
+ }
+
+ Status = gBS->HandleProtocol (gImageHandle,
&gEfiLoadedImageDevicePathProtocolGuid, (VOID **) &ImageDevicePath);
+ ASSERT_EFI_ERROR (Status);
+
BootMenuData->TitleToken[0] = STRING_TOKEN
(STR_BOOT_POPUP_MENU_TITLE_STRING);
BootMenuData->PtrTokens = AllocateZeroPool (BootOptionCount * sizeof
(EFI_STRING_ID));
ASSERT (BootMenuData->PtrTokens != NULL);
@@ -284,6 +289,14 @@
!IsBootManagerMenu (&BootOption[Index])) {
continue;
}
+
+ //
+ // Don't display myself
+ //
+ if (CompareMem (BootOption[Index].FilePath, ImageDevicePath,
GetDevicePathSize (ImageDevicePath)) == 0) {
+ continue;
+ }
+
ASSERT (BootOption[Index].Description != NULL);
BootMenuData->PtrTokens[StrIndex++] = HiiSetString (
gStringPackHandle,
Modified:
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
===================================================================
---
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
2015-11-16 08:02:03 UTC (rev 18803)
+++
branches/UDK2015/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
2015-11-16 08:02:59 UTC (rev 18804)
@@ -52,6 +52,7 @@
[Protocols]
gEfiBootLogoProtocolGuid ## CONSUMES
+ gEfiLoadedImageDevicePathProtocolGuid ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow ##
PRODUCES
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits