From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3C9EC1A1E56 for ; Wed, 31 Aug 2016 19:02:39 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 31 Aug 2016 19:02:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,264,1470726000"; d="scan'208";a="755756964" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 31 Aug 2016 19:02:38 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 31 Aug 2016 19:02:38 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 31 Aug 2016 19:02:38 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.102]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.91]) with mapi id 14.03.0248.002; Thu, 1 Sep 2016 10:02:27 +0800 From: "Ni, Ruiyu" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Dong, Eric" Thread-Topic: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile Thread-Index: AQHSA2BjvCbcpJcoHE6n9dN9EPccMKBj4jTw Date: Thu, 1 Sep 2016 02:02:26 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58D45B2A@SHSMSX103.ccr.corp.intel.com> References: <1472631553-26232-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1472631553-26232-1-git-send-email-liming.gao@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg UefiBootManagerLib: Ignore BootManagerMenuApp from LoadFile X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 02:02:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Liming, Please use the term "BootManagerMenu" instead of "BootMenuApp", to avoid co= nfusion when reading from future developers. // Ignore BootMenuApp. its boot option will be created by BmRegisterBootMan= agerMenu(). --> // Ignore BootManagerMenu, which will be auto-created by EfiBootManagerGetB= ootManagerMenu(). BmIsBootMenuAppFilePath --> BmIsBootManagerMenuFilePath With the above two changes,=20 Reviewed-by: Ruiyu Ni > -----Original Message----- > From: Gao, Liming > Sent: Wednesday, August 31, 2016 4:19 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Dong, Eric > Subject: [Patch] MdeModulePkg UefiBootManagerLib: Ignore > BootManagerMenuApp from LoadFile >=20 > BootManagerMenuApp boot option is handled by > EfiBootManagerGetBootManagerMenu. > Don't need to handle it again when parse LoadFile protocol. >=20 > Cc: Ruiyu Ni > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Liming Gao > --- > MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 17 +++++++------- > --- > 1 file changed, 7 insertions(+), 10 deletions(-) >=20 > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c > index ecd0ae3..f8a3988 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; >=20 > ASSERT (BootOptionCount !=3D NULL); >=20 > @@ -2070,6 +2069,12 @@ BmEnumerateBootOptions ( > &Handles > ); > for (Index =3D 0; Index < HandleCount; Index++) { > + // > + // Ignore BootMenuApp. its boot option will be created by > BmRegisterBootManagerMenu(). > + // > + if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) > { > + continue; > + } >=20 > Description =3D BmGetBootDescription (Handles[Index]); > BootOptions =3D ReallocatePool ( > @@ -2079,19 +2084,11 @@ BmEnumerateBootOptions ( > ); > ASSERT (BootOptions !=3D NULL); >=20 > - // > - // If LoadFile includes BootMenuApp, its boot attribue will be set t= o APP > and HIDDEN. > - // > - BootAttributes =3D LOAD_OPTION_ACTIVE; > - if (BmIsBootMenuAppFilePath (DevicePathFromHandle (Handles[Index]))) > { > - BootAttributes =3D LOAD_OPTION_CATEGORY_APP | > LOAD_OPTION_ACTIVE | LOAD_OPTION_HIDDEN; > - } > - > Status =3D EfiBootManagerInitializeLoadOption ( > &BootOptions[(*BootOptionCount)++], > LoadOptionNumberUnassigned, > LoadOptionTypeBoot, > - BootAttributes, > + LOAD_OPTION_ACTIVE, > Description, > DevicePathFromHandle (Handles[Index]), > NULL, > -- > 2.8.0.windows.1