summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiBootManagerLib
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2016-09-01 13:41:20 +0800
committerLiming Gao <liming.gao@intel.com>2016-09-02 15:45:55 +0800
commit8953d69a5ca7f18f80f46e67da95c2527ca6ee89 (patch)
tree52003047f6169a9c4011178fd334b52163f2f9da /MdeModulePkg/Library/UefiBootManagerLib
parent7c69fbf20d409516c80355de9a40656ec55f5e21 (diff)
downloadedk2-8953d69a5ca7f18f80f46e67da95c2527ca6ee89.tar.gz
edk2-8953d69a5ca7f18f80f46e67da95c2527ca6ee89.tar.bz2
edk2-8953d69a5ca7f18f80f46e67da95c2527ca6ee89.zip
MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenu from LoadFile
BootManagerMenu boot option is handled by EfiBootManagerGetBootManagerMenu. Don't need to handle it again when parse LoadFile protocol. In V2, use "BootManagerMenu" instead of "BootMenuApp". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index fe09a041cf..6b84b85fca 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1940,7 +1940,6 @@ BmEnumerateBootOptions (
UINTN Removable;
UINTN Index;
CHAR16 *Description;
- UINT32 BootAttributes;
ASSERT (BootOptionCount != NULL);
@@ -2070,6 +2069,12 @@ BmEnumerateBootOptions (
&Handles
);
for (Index = 0; Index < HandleCount; Index++) {
+ //
+ // Ignore BootManagerMenu. its boot option will be created by EfiBootManagerGetBootManagerMenu().
+ //
+ if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index]))) {
+ continue;
+ }
Description = BmGetBootDescription (Handles[Index]);
BootOptions = ReallocatePool (
@@ -2079,19 +2084,11 @@ BmEnumerateBootOptions (
);
ASSERT (BootOptions != NULL);
- //
- // If LoadFile includes BootManagerMenu, its boot attribue will be set to APP and HIDDEN.
- //
- BootAttributes = LOAD_OPTION_ACTIVE;
- if (BmIsBootManagerMenuFilePath (DevicePathFromHandle (Handles[Index]))) {
- BootAttributes = LOAD_OPTION_CATEGORY_APP | LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN;
- }
-
Status = EfiBootManagerInitializeLoadOption (
&BootOptions[(*BootOptionCount)++],
LoadOptionNumberUnassigned,
LoadOptionTypeBoot,
- BootAttributes,
+ LOAD_OPTION_ACTIVE,
Description,
DevicePathFromHandle (Handles[Index]),
NULL,