public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Wim Vervoorn <wvervoorn@eltan.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: HiiSetToDefaults behavior
Date: Fri, 25 Aug 2017 08:13:21 +0000	[thread overview]
Message-ID: <e366c789dac14a7b93ebfb59c6979fe3@Eltsrv03.Eltan.local> (raw)

Hello,

I have a question about the expect behavior of HiiSetToDefaults(). So far I haven't been able to find a clear definition of what this should do.

What I expect is that this call would only touch the items that have a default defined. So what I would think is that Test2OfValue below would become 1 and Test1OfValue would be untouched as long as it's value is either 0 or 1 and become 1 if this is not the case.

What seems to happen is that for Test1OfValue the first item is used as the default.

oneof name = Test1OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test1OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST1_PROMPT),
      help    = STRING_TOKEN(STR_TEST1_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = 0;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0;
endoneof;

oneof name = Test2OneOf,                               // Define reference name for Question
      varid   = lIfrNVData.Test2OfValue,                                      // Use "DataStructure.Member" to reference Buffer Storage
      prompt  = STRING_TOKEN(STR_TEST2_PROMPT),
      help    = STRING_TOKEN(STR_TEST2_HELP),
      //
      // Define an option (EFI_IFR_ONE_OF_OPTION)
      //
      option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = DEFAULT;
      option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = 0;
endoneof;


Best Regards,
Wim Vervoorn

Eltan B.V.
Ambachtstraat 23
5481 SM Schijndel
The Netherlands

T : +31-(0)73-594 46 64
E : wvervoorn@eltan.com
W : http://www.eltan.com<http://www.eltan.com/>
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELETE THIS MESSAGE AND ALL COPIES."





             reply	other threads:[~2017-08-25  8:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25  8:13 Wim Vervoorn [this message]
2017-08-25  8:57 ` HiiSetToDefaults behavior Bi, Dandan
2017-08-25  9:07   ` Wim Vervoorn
2017-08-25 14:58     ` Bi, Dandan

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=e366c789dac14a7b93ebfb59c6979fe3@Eltsrv03.Eltan.local \
    --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