From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7C74081D13 for ; Sun, 30 Oct 2016 20:06:50 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 30 Oct 2016 20:06:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,573,1473145200"; d="scan'208";a="25890123" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 30 Oct 2016 20:06:45 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 30 Oct 2016 20:06:45 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 30 Oct 2016 20:06:45 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.104]) with mapi id 14.03.0248.002; Mon, 31 Oct 2016 11:06:43 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly Thread-Index: AQHSMMOiatIU5+SGykS+PU+mfSpzD6DB5fxQ Date: Mon, 31 Oct 2016 03:06:42 +0000 Message-ID: References: <1477621963-61160-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1477621963-61160-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot order" page correctly 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: Mon, 31 Oct 2016 03:06:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: Bi, Dandan > Sent: Friday, October 28, 2016 10:33 AM > To: edk2-devel@lists.01.org > Cc: Dong, Eric > Subject: [patch] IntelFrameworkModulePkg/BootMaint: Show "Change Boot ord= er" page correctly >=20 > Some boot options may be deleted in the "Delete Boot Option page", > But the data BootOptionOrder in BmmFakeNvData may not be updated. > So when user enter the "Change Boot Order" page, we should not always > get the BootOptionOrder in BmmFakeNvData, it will result in incorrect > UI behaviors. When the Boot Options have been saved, > we should get the BootOptionOrder through function GetBootOrder. >=20 > For driver option codes need to do the same change. >=20 > This patch is to fix the issue in bugzilla: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D39 >=20 > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi > --- > .../Universal/BdsDxe/BootMaint/UpdatePage.c | 22 ++++++++++++++++= +++--- > 1 file changed, 19 insertions(+), 3 deletions(-) >=20 > diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePag= e.c > b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c > index b13ed11..b7fee3a 100644 > --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c > +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c > @@ -1,9 +1,9 @@ > /** @file > Dynamically update the pages. >=20 > -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D License > which accompanies this distribution. The full text of the license may b= e found at > http://opensource.org/licenses/bsd-license.php >=20 > @@ -557,18 +557,34 @@ UpdateOrderPage ( > QuestionId =3D 0; > VarOffset =3D 0; > switch (UpdatePageId) { >=20 > case FORM_BOOT_CHG_ID: > - //GetBootOrder (CallbackData); > + // > + // If the BootOptionOrder in the BmmFakeNvData are same with the dat= e in the BmmOldFakeNVData, > + // means all Boot Options has been save in BootOptionMenu, we can ge= t the date from the menu. > + // else means browser maintains some uncommitted date which are not = saved in BootOptionMenu, > + // so we should not get the data from BootOptionMenu to show it. > + // > + if (CompareMem (CallbackData->BmmFakeNvData.BootOptionOrder, Callbac= kData->BmmOldFakeNVData.BootOptionOrder, sizeof > (CallbackData->BmmFakeNvData.BootOptionOrder)) =3D=3D 0) { > + GetBootOrder (CallbackData); > + } > OptionOrder =3D CallbackData->BmmFakeNvData.BootOptionOrder; > QuestionId =3D BOOT_OPTION_ORDER_QUESTION_ID; > VarOffset =3D BOOT_OPTION_ORDER_VAR_OFFSET; > break; >=20 > case FORM_DRV_CHG_ID: > - //GetDriverOrder (CallbackData); > + // > + // If the DriverOptionOrder in the BmmFakeNvData are same with the d= ate in the BmmOldFakeNVData, > + // means all Driver Options has been save in DriverOptionMenu, we ca= n get the DriverOptionOrder from the menu. > + // else means browser maintains some uncommitted date which are not = saved in DriverOptionMenu, > + // so we should not get the data from DriverOptionMenu to show it. > + // > + if (CompareMem (CallbackData->BmmFakeNvData.DriverOptionOrder, Callb= ackData->BmmOldFakeNVData.DriverOptionOrder, > sizeof (CallbackData->BmmFakeNvData.DriverOptionOrder)) =3D=3D 0) { > + GetDriverOrder (CallbackData); > + } > OptionOrder =3D CallbackData->BmmFakeNvData.DriverOptionOrder; > QuestionId =3D DRIVER_OPTION_ORDER_QUESTION_ID; > VarOffset =3D DRIVER_OPTION_ORDER_VAR_OFFSET; > break; > } > -- > 1.9.5.msysgit.1