Closed CuriouslyCurious closed 3 years ago
/sys/class/dmi/id/board_name
could be misleading because it's not exactly the product name, but the motherboard's.
We should automatically fail the readout if your manufacturer just didn't set an appropriate value. I've seen a couple images where the machine spits out this same string, so we can treat this as an Err(ReadoutError::MetricNotAvailable)
Yeah, that'd work. I can make a PR for this if you want.
Is there a desire to have the motherboard name as a separate field?
Yeah, that'd work. I can make a PR for this if you want.
Great, have fun :)
Is there a desire to have the motherboard name as a separate field?
I'm not against it, I can see some situations where it might be relevant.
We can complement this readout with the boot method that was used (BIOS or UEFI), I don't know where Linux stores this, but FreeBSD has a convenient sysctl value called machdep.bootmethod
which serves this exact purpose.
Excuse me for the uncleanliness of the commits. Late night pushing of code leads to silliness. :sweat_smile:
Hey!
On my custom-built machine the Machine-field in macchina gives me no useful information at all, since it reads fields the product_* from /sys that are not filled in by anyone. It works well on my laptop on the other hand.
Maybe it should read from for example
/sys/class/dmi/id/board_name
when the info received from the product_* is useless. Could also possibly change the Machine category name to "Motherboard" or something similar to better indicate what's being described in that case.