The following statement appears in DriverSampleDxe for a checkbox:

        checkbox varid   = MyIfrNVData.ChooseToActivateNuclearWeaponry,
                 prompt   = STRING_TOKEN(0x0029),
                 help     = STRING_TOKEN(0x002A),




                 flags    = CHECKBOX_DEFAULT | CHECKBOX_DEFAULT_MFG,
                 key      = 0,
                 default  = 1,
        endcheckbox;

Since a checkbox has a type of Boolean, I would have expected the value after 
default to be a Boolean also. vfrConstantValueField is the terminal used to 
process these values and this supports "TRUE" and "FALSE" There is no explicit 
statement in the VFR spec which says that this will be converted to a type 
Boolean. I suggest that these be changed in the sample to use the correct 
Boolean values and that the VfrCompiler generate a warning in this case 
(something like "forced conversion of integer to Boolean"

I would suggest the same for handling of items such as suppressif 1, or at 
least clarify that the compiler will automatically promote integers to Booleans 
(because the UEFI spec is pretty clear that this is not a Boolean)

Tim
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to