Revision: 18805
http://sourceforge.net/p/edk2/code/18805
Author: vanjeff
Date: 2015-11-16 08:03:52 +0000 (Mon, 16 Nov 2015)
Log Message:
-----------
MdeModulePkg: Update UiApp to not display itself
(Sync patch r18657 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/18657
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Application/UiApp/BootMngr/BootManager.c
branches/UDK2015/MdeModulePkg/Application/UiApp/Ui.h
branches/UDK2015/MdeModulePkg/Application/UiApp/UiApp.inf
Modified: branches/UDK2015/MdeModulePkg/Application/UiApp/BootMngr/BootManager.c
===================================================================
--- branches/UDK2015/MdeModulePkg/Application/UiApp/BootMngr/BootManager.c
2015-11-16 08:02:59 UTC (rev 18804)
+++ branches/UDK2015/MdeModulePkg/Application/UiApp/BootMngr/BootManager.c
2015-11-16 08:03:52 UTC (rev 18805)
@@ -219,7 +219,9 @@
VOID
)
{
+ EFI_STATUS Status;
UINTN Index;
+ EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath;
EFI_BOOT_MANAGER_LOAD_OPTION *BootOption;
UINTN BootOptionCount;
EFI_STRING_ID Token;
@@ -240,6 +242,9 @@
DeviceType = (UINT16) -1;
+ Status = gBS->HandleProtocol (gImageHandle,
&gEfiLoadedImageDevicePathProtocolGuid, (VOID **) &ImageDevicePath);
+ ASSERT_EFI_ERROR (Status);
+
//
// for better user experience
// 1. User changes HD configuration (e.g.: unplug HDD), here we have a
chance to remove the HDD boot option
@@ -290,6 +295,13 @@
}
//
+ // 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
//
IsLegacyOption = (BOOLEAN) (
Modified: branches/UDK2015/MdeModulePkg/Application/UiApp/Ui.h
===================================================================
--- branches/UDK2015/MdeModulePkg/Application/UiApp/Ui.h 2015-11-16
08:02:59 UTC (rev 18804)
+++ branches/UDK2015/MdeModulePkg/Application/UiApp/Ui.h 2015-11-16
08:03:52 UTC (rev 18805)
@@ -30,6 +30,7 @@
#include <Guid/HiiBootMaintenanceFormset.h>
#include <Protocol/LoadFile.h>
+#include <Protocol/LoadedImage.h>
#include <Protocol/DevicePath.h>
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/Smbios.h>
Modified: branches/UDK2015/MdeModulePkg/Application/UiApp/UiApp.inf
===================================================================
--- branches/UDK2015/MdeModulePkg/Application/UiApp/UiApp.inf 2015-11-16
08:02:59 UTC (rev 18804)
+++ branches/UDK2015/MdeModulePkg/Application/UiApp/UiApp.inf 2015-11-16
08:03:52 UTC (rev 18805)
@@ -123,6 +123,7 @@
gEfiPciIoProtocolGuid ## CONSUMES
gEfiDevicePathToTextProtocolGuid ## CONSUMES
gEfiBootLogoProtocolGuid ## CONSUMES
+ gEfiLoadedImageDevicePathProtocolGuid ## CONSUMES
[FeaturePcd]
------------------------------------------------------------------------------
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