mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Bug fix:Some sensor will wrongfully report '0' as interpreted reading
- Avoid treating '0' raw value as a special case.
This commit is contained in:
parent
7cc935f2f1
commit
8582569149
@ -266,9 +266,9 @@ ipmi_sensor_print_full_analog(struct ipmi_intf *intf,
|
||||
}
|
||||
|
||||
/* convert RAW reading into units */
|
||||
val = (rsp->data[0] > 0)
|
||||
? sdr_convert_sensor_reading(sensor, rsp->data[0])
|
||||
: 0;
|
||||
/* a raw reading of 0 is perfectly valid, and might be converted to a positive or
|
||||
negative value, as any other raw values */
|
||||
val = sdr_convert_sensor_reading(sensor, rsp->data[0]);
|
||||
status = (char *) ipmi_sdr_get_status(sensor, rsp->data[2]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user