It can be useful to know what type of machine we are running on for desktop
related thing.
It also allow us to support all the DMI variable that linux driver can fetch.
Sponsored-by: The FreeBSD Foundation
Differential D26045
libsa: smbios: Parse the chassis type and export it as smbios.chassis.type manu on Aug 12 2020, 6:00 PM. Authored by Tags None Referenced Files
Subscribers None
Details
Diff Detail
Event TimelineComment Actions Repeating setenv in each case seems a bit odd to me. Why not a variable or even a helper function that just does e.g. return ("Pizza Box") for each case? Comment Actions Yeah but doesn't some code analysis stuff warn on those ? (or maybe some cflags ...) that's the reason I've left them.
Comment Actions
Nah, it's a pretty common pattern and compilers/static analysis is smart enough. There are a ton of examples in contrib/elftoolchain/readelf/readelf.c
|