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 : wvervo...@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."



_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to