Follow-up Comment #5, sr #111312 (group freeipmi): Hard coding your debug information in to emulate your system:
```
diff --git a/libfreeipmi/sensor-read/ipmi-sensor-read.c
b/libfreeipmi/sensor-read/ipmi-sensor-read.c
index f3aa4bf68..0132a85dc 100644
--- a/libfreeipmi/sensor-read/ipmi-sensor-read.c
+++ b/libfreeipmi/sensor-read/ipmi-sensor-read.c
@@ -826,7 +826,22 @@ ipmi_sensor_read (ipmi_sensor_read_ctx_t ctx,
goto cleanup;
}
- /* if the sensor is not analog, this is most likely a bug in the
+ r_exponent = 0xE;
+ if (r_exponent & 0x08)
+ r_exponent |= 0xF0;
+ b_exponent = 0x1;
+ if (b_exponent & 0x08)
+ b_exponent |= 0xF0;
+ m = 0x3F;
+ if (m & 0x200)
+ m |= 0xFE00;
+ b = 0x93 | (0x1 << 8);
+ if (b & 0x200)
+ b |= 0xFE00;
+ linearization = 0;
+ analog_data_format = 0x2;
+
+ /* if the sensor is not analog, this is most likely a bug in the
* SDR, since we shouldn't be decoding a non-threshold sensor.
*/
if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format))
@@ -852,6 +867,7 @@ ipmi_sensor_read (ipmi_sensor_read_ctx_t ctx,
goto cleanup;
}
+ local_sensor_reading_raw = 0xFC;
if (ipmi_sensor_decode_value (r_exponent,
b_exponent,
m,
```
resulted in about the number we'd expect
```
ID | Name | Type | Reading | Units | Event
4 | CPU1 Temp | Temperature | 37.78 | C | 'OK'
```
So the question is, why is the number that is being output wrong.
Did you build this by hand? I'm guessing there is some side effect bug
(memory corruption, uninitialized variable, etc. etc.) that may be unique to
your system / compiler / library dependency, etc.
I'll post a debug patch for you to try tomorrow if that's ok.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111312>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
