summaryrefslogtreecommitdiff
path: root/debian/patches/20_ipmi_sdr
blob: dcb8c23f93fffea6eefaf721a2fe727a2f2c9c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## 20_ipmi_sdr.dpatch by Cyril Brulebois <cyril.brulebois@kerlabs.com>
##
## Enable reading temperatures again (Closes: #507760).
--- a/lib/ipmi_sdr.c
+++ b/lib/ipmi_sdr.c
@@ -1122,6 +1122,13 @@
 		} else if (IS_SCANNING_DISABLED(rsp->data[1])) {
 			/* Sensor Scanning Disabled */
 			validread = 0;
+			if (rsp->data[0] != 0) {
+				/* we might still get a valid reading */
+				val = sdr_convert_sensor_reading(sensor,
+								 rsp->data[0]);
+				if (val != 0.0)
+					validread = 1;
+			}
 		} else if (rsp->data[0] != 0) {
 			/* convert RAW reading into units */
 			val = sdr_convert_sensor_reading(sensor, rsp->data[0]);