public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wang, Sunny (HPS SW)" <sunnywang@hpe.com>
To: Liming Gao <liming.gao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenu from LoadFile
Date: Thu, 1 Sep 2016 07:20:23 +0000	[thread overview]
Message-ID: <TU4PR84MB0304550A98FD28D0BA327649A8E20@TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <1472709909-32536-1-git-send-email-liming.gao@intel.com>

Looks good to me.
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

Regards,
Sunny Wang

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
Sent: Thursday, September 01, 2016 2:05 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH v2] 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>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index fe09a04..6b84b85 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,
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


      reply	other threads:[~2016-09-01  7:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01  6:05 [PATCH v2] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenu from LoadFile Liming Gao
2016-09-01  7:20 ` Wang, Sunny (HPS SW) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TU4PR84MB0304550A98FD28D0BA327649A8E20@TU4PR84MB0304.NAMPRD84.PROD.OUTLOOK.COM \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox