summaryrefslogtreecommitdiff
path: root/util/isensor.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/isensor.c')
-rw-r--r--util/isensor.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/util/isensor.c b/util/isensor.c
index 1f772bd..a204990 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -255,7 +255,7 @@ char *decode_entity_id(int id) {
* Global Data
************************/
static char *progname = "isensor";
-static char *progver = "3.05";
+static char *progver = "3.06";
#ifdef WIN32
static char savefile[] = "%ipmiutildir%\\thresholds.cmd";
#else
@@ -655,17 +655,17 @@ char *get_unit_type(int iunits, int ibase, int imod, int fshort)
break;
}
if ((umod == 0) && (iunits > 0)) {
- /* special cases for other SensorUnits1 bits */
- if ((iunits & 0x01) != 0) { /*percentage*/
- if (fshort) pstr = "%";
- else pstr = "percent";
- } else if (iunits == 0xC0) { /*no analog reading*/
- pstr = "na";
- } else if (iunits == 0x18) {
- /* For Tyan fans: base=42, units=24.(0x18) -> cycles/hour */
- snprintf(unitstr,sizeof(unitstr),"%s/hour",punittypes[jbase]);
- pstr = unitstr;
- }
+ /* special cases for other SensorUnits1 bits */
+ if ((iunits & 0x01) != 0) { /*percentage*/
+ if (fshort) pstr = "%";
+ else pstr = "percent";
+ } else if (iunits == 0xC0) { /*no analog reading*/
+ pstr = "na";
+ } else if (iunits == 0x18) {
+ /* For Tyan fans: base=42, units=24.(0x18) -> cycles/hour */
+ snprintf(unitstr,sizeof(unitstr),"%s/hour",punittypes[jbase]);
+ pstr = unitstr;
+ }
}
return(pstr);
}
@@ -2650,6 +2650,7 @@ ShowSDR(char *tag, uchar *sdr)
sens[2],i,sens[0],sens[1],sdr01->sens_base,
sdr01->sens_units);
if ((sens[1] & 0x20) != 0) { i = 7; val = 0; } /* Init state */
+ else if (sdr01->sens_units == 0xC0) i = 42; /*reading NotAvailable*/
else if (sens[2] == 0xc7) { i = 10; val = 0; /* Absent (Intel) */
if (fdebug) printf("sensor[%x] is absent (c7), no reading\n",
sdr01->sens_num);