If the processor voltage encoding has some of the reserved bits set and none of the proper bits set, print it as "Unknown" instead of an empty field.
Signed-off-by: Jean Delvare <jdelv...@suse.de> --- dmidecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- dmidecode.orig/dmidecode.c 2020-02-19 11:24:43.293067794 +0100 +++ dmidecode/dmidecode.c 2020-02-19 11:42:35.564558142 +0100 @@ -1190,13 +1190,13 @@ static void dmi_processor_voltage(u8 cod if (code & 0x80) printf(" %.1f V", (float)(code & 0x7f) / 10); + else if ((code & 0x07) == 0x00) + printf(" Unknown"); else { for (i = 0; i <= 2; i++) if (code & (1 << i)) printf(" %s", voltage[i]); - if (code == 0x00) - printf(" Unknown"); } } -- Jean Delvare SUSE L3 Support _______________________________________________ https://lists.nongnu.org/mailman/listinfo/dmidecode-devel