From aa4e65479ebd7f13e877a352e835698365c3b762 Mon Sep 17 00:00:00 2001 From: khali Date: Wed, 24 Nov 2010 13:05:18 +0000 Subject: Assume that the max power capacity is expressed in Watts, not milliWatts. The specification isn't clear about the actual unit, but the only implementation I've seen (HP Proliant G7) clearly uses Watts. Also, using milliWatts would limit the max value that can be stored to 32 W, which doesn't make much sense. --- dmidecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmidecode.c b/dmidecode.c index 0d2abcf..84ac63a 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -2948,7 +2948,7 @@ static void dmi_power_supply_power(u16 code) if (code == 0x8000) printf(" Unknown"); else - printf(" %.3f W", (float)code / 1000); + printf(" %u W", (unsigned int)code); } static const char *dmi_power_supply_type(u8 code) -- cgit v1.2.1