Changeset 5942 for lm-sensors/trunk/prog

Show
Ignore:
Timestamp:
03/16/11 15:55:04 (14 months ago)
Author:
groeck
Message:

sensors: If an attribute value is 0, display the value with its base unit,
not with the minumum supported unit.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/sensors/chips.c

    r5880 r5942  
    441441        }; 
    442442        struct scale_table *scale = prefix_scales; 
     443 
     444        if (abs_value == 0) { 
     445                *prefixstr = ""; 
     446                return; 
     447        } 
    443448 
    444449        while (scale->upper_bound && abs_value > scale->upper_bound) {