The current grammar for VFR shows the following for "checkbox":
vfrStatementCheckBox ::=
"checkbox"
vfrQuestionHeader ","
{ "flags" "=" vfrCheckBoxFlags "," }
{ "key" "=" Number "," }
vfrStatementQuestionOptionList
"endcheckbox" ";"
And then a little further down it has this note:
BEHAVIORS AND RESTRICTIONS:
The value of key is used as question ID.
Now, observe this example from DriverSampleDxe (Vfr.vfr, line 177):
checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
//
// CHECKBOX_DEFAULT indicate this checkbox is marked with
EFI_IFR_CHECKBOX_DEFAULT
// CHECKBOX_DEFAULT_MFG indicate EFI_IFR_CHECKBOX_DEFAULT_MFG.
//
flags = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG,
key = 0,
default = 1,
endcheckbox;
Notice that (a) there is no "questionid" (from the vfrQuestionHeader terminal)
and (b) key is set to 0. Since 0 is not a valid question identifier value
(although the UEFI 2.4 spec is not so clear on this, you can see that it is
true from how it is referenced in the EFI_IFR_REF structure 29.3.8.3.59 and the
callback). So it is not clear whether the intention was to force the assignment
of a non-conflicting value or it really intended that the question identifier
be 0.
There is a similar issue on line 590 (another checkbox). Am I missing something
here? Is there a specific reason why "key" (an anachronism from the Framework
days) is used instead of "questionid"?
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel