public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [patch] MdeModulePkg/Browser: Fix conflicting policy in getting default of checkbox
Date: Fri, 19 Aug 2016 06:57:12 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155ECF6C@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1471587351-146472-1-git-send-email-dandan.bi@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, August 19, 2016 2:16 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [patch] MdeModulePkg/Browser: Fix conflicting policy in getting
> default of checkbox
> 
> From: Liming Gao <liming.gao@intel.com>
> 
> 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.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> 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 == EFI_HII_DEFAULT_CLASS_STANDARD) && ((Question-
> >Flags & EFI_IFR_CHECKBOX_DEFAULT) != 0)) ||
>            ((DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) &&
> ((Question->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) != 0))
>           ) {
>          HiiValue->Value.b = TRUE;
> -      } else {
> -        HiiValue->Value.b = FALSE;
>        }
> 
>        return EFI_SUCCESS;
>      }
>    }
> @@ -4267,10 +4265,15 @@ ReGetDefault:
>    //
>    // For Questions without default value for all the default id in the
> DefaultStoreList.
>    //
>    Status = EFI_NOT_FOUND;
>    switch (Question->Operand) {
> +  case EFI_IFR_CHECKBOX_OP:
> +    HiiValue->Value.b = FALSE;
> +    Status = EFI_SUCCESS;
> +    break;
> +
>    case EFI_IFR_NUMERIC_OP:
>      //
>      // Take minimum value as numeric default value
>      //
>      if ((Question->Flags & EFI_IFR_DISPLAY) == 0) {
> --
> 1.9.5.msysgit.1



      reply	other threads:[~2016-08-19  6:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  6:15 [patch] MdeModulePkg/Browser: Fix conflicting policy in getting default of checkbox Dandan Bi
2016-08-19  6:57 ` Gao, Liming [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=4A89E2EF3DFEDB4C8BFDE51014F606A1155ECF6C@shsmsx102.ccr.corp.intel.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