From: "Bi, Dandan" <dandan.bi@intel.com>
To: Wim Vervoorn <wvervoorn@eltan.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: HiiSetToDefaults behavior
Date: Fri, 25 Aug 2017 08:57:26 +0000 [thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B956C2A@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <e366c789dac14a7b93ebfb59c6979fe3@Eltsrv03.Eltan.local>
Hi Wim Vervoorn,
Current behavior of HiiSetToDefaults():
1. For Question has the specified type default value, will set the default value to storage for the Question.
2. For Question without the specified type default, other type default value can be shared.(such as: standard default doesn't exit, but Manufacturing Default exits, Manufacturing Default value can
be shared with standard default)
3. For Question without any types of default value, current implementation will
(a) set first option value as the default value of oneof
(b) set minimum value as the default value of numeric
....
Thanks,
Dandan
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Wim Vervoorn
Sent: Friday, August 25, 2017 4:13 PM
To: edk2-devel@lists.01.org
Subject: [edk2] HiiSetToDefaults behavior
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."
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2017-08-25 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 8:13 HiiSetToDefaults behavior Wim Vervoorn
2017-08-25 8:57 ` Bi, Dandan [this message]
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=3C0D5C461C9E904E8F62152F6274C0BB3B956C2A@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