public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* HiiSetToDefaults behavior
@ 2017-08-25  8:13 Wim Vervoorn
  2017-08-25  8:57 ` Bi, Dandan
  0 siblings, 1 reply; 4+ messages in thread
From: Wim Vervoorn @ 2017-08-25  8:13 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

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."





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-25 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25  8:13 HiiSetToDefaults behavior Wim Vervoorn
2017-08-25  8:57 ` Bi, Dandan
2017-08-25  9:07   ` Wim Vervoorn
2017-08-25 14:58     ` Bi, Dandan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox