From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id D2DF51A1DFE for ; Thu, 18 Aug 2016 23:57:15 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 18 Aug 2016 23:57:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,544,1464678000"; d="scan'208";a="1017168081" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 18 Aug 2016 23:57:15 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 18 Aug 2016 23:57:14 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 18 Aug 2016 23:57:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Fri, 19 Aug 2016 14:57:12 +0800 From: "Gao, Liming" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Dong, Eric" Thread-Topic: [patch] MdeModulePkg/Browser: Fix conflicting policy in getting default of checkbox Thread-Index: AQHR+eE4VpJHcL32JUG1/xznMsr0rKBP2fdg Date: Fri, 19 Aug 2016 06:57:12 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155ECF6C@shsmsx102.ccr.corp.intel.com> References: <1471587351-146472-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1471587351-146472-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] MdeModulePkg/Browser: Fix conflicting policy in getting default of checkbox 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: Fri, 19 Aug 2016 06:57:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Bi, Dandan > Sent: Friday, August 19, 2016 2:16 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Dong, Eric > Subject: [patch] MdeModulePkg/Browser: Fix conflicting policy in getting > default of checkbox >=20 > From: Liming Gao >=20 > We have added a new policy to get default value for question: > get default from other default id if current default is not specified. > But when getting default value for checkbox, if the default > flag is not set, it will set the default value to FALSE for checkbox. > This behavior in checkbox conflicts with the new added policy, > so now we move this behavior to the end of getting default form other > default id. >=20 > Cc: Liming Gao > Cc: Eric Dong > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Dandan Bi > --- > MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > index cd3c8cc..00f4b41 100644 > --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c > @@ -4239,12 +4239,10 @@ ReGetDefault: > // > if (((DefaultId =3D=3D EFI_HII_DEFAULT_CLASS_STANDARD) && ((Questi= on- > >Flags & EFI_IFR_CHECKBOX_DEFAULT) !=3D 0)) || > ((DefaultId =3D=3D EFI_HII_DEFAULT_CLASS_MANUFACTURING) && > ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) !=3D 0)) > ) { > HiiValue->Value.b =3D TRUE; > - } else { > - HiiValue->Value.b =3D FALSE; > } >=20 > return EFI_SUCCESS; > } > } > @@ -4267,10 +4265,15 @@ ReGetDefault: > // > // For Questions without default value for all the default id in the > DefaultStoreList. > // > Status =3D EFI_NOT_FOUND; > switch (Question->Operand) { > + case EFI_IFR_CHECKBOX_OP: > + HiiValue->Value.b =3D FALSE; > + Status =3D EFI_SUCCESS; > + break; > + > case EFI_IFR_NUMERIC_OP: > // > // Take minimum value as numeric default value > // > if ((Question->Flags & EFI_IFR_DISPLAY) =3D=3D 0) { > -- > 1.9.5.msysgit.1