summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2010-11-24 13:05:18 +0000
committerkhali <khali>2010-11-24 13:05:18 +0000
commitaa4e65479ebd7f13e877a352e835698365c3b762 (patch)
tree3aee70298621709132d07d10a015053843cd4ac0
parentd6a257b24358a9aec8790839bd2cfd0c88baca97 (diff)
downloaddmidecode-aa4e65479ebd7f13e877a352e835698365c3b762.tar.gz
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.
-rw-r--r--dmidecode.c2
1 files changed, 1 insertions, 1 deletions
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)