Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47107 )
Change subject: option.h: Add strongly-typed `get_option` wrappers ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47107/2/src/include/option.h File src/include/option.h:
https://review.coreboot.org/c/coreboot/+/47107/2/src/include/option.h@34 PS2, Line 34: read_option_ I remember I mentioned `read_option()`. But in this context I would leave it to `get_option`. Also, how about moving the type in front of `option`? e.g. `get_int_option()` is easier to read imho. What do you think?
https://review.coreboot.org/c/coreboot/+/47107/2/src/include/option.h@36 PS2, Line 36: type value; \ For the moment it seems a good idea to initialize it to 0. At least on little-endian that gives us a sane value if the option is actually shorter. e.g. somebody calls `get_int_option("gfx_uma", 4)` but `gfx_uma` is only 4 bits in CMOS; get_option() would leave the more significant bytes uninitialized.