2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

sensors: If an attribute value is 0, display the value with its base unit,

not with the minumum supported unit.



git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5942 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Guenter Roeck
2011-03-16 14:55:04 +00:00
parent 1ad58f5ff9
commit aea4b6cbe8
2 changed files with 7 additions and 0 deletions

View File

@@ -441,6 +441,11 @@ static void scale_value(double *value, const char **prefixstr)
};
struct scale_table *scale = prefix_scales;
if (abs_value == 0) {
*prefixstr = "";
return;
}
while (scale->upper_bound && abs_value > scale->upper_bound) {
divisor = scale->upper_bound;
scale++;