Changeset 5942

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.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r5941 r5942  
    1515  sensors: Display 3 decimal places in raw output 
    1616           Add support for intrusion detection (#2370) 
     17           If an attribute value is 0, display the value with its base unit, 
     18           not with the minumum supported unit 
    1719  sensors-detect: Improve LM90 and W83L771 detection 
    1820                  Fix error seen if I2C bus numbers are not sequential 
  • 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) {