summaryrefslogtreecommitdiff
path: root/util/isensor.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/isensor.c')
-rw-r--r--util/isensor.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/util/isensor.c b/util/isensor.c
index 69d901f..7418ae9 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -161,7 +161,7 @@ extern int decode_sensor_fujitsu(uchar *sdr,uchar *reading,char *pstring,
extern int decode_sensor_sun(uchar *sdr,uchar *reading,char *pstring,
int slen); /*see oem_sun.c*/
extern int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring,
- int slen, int fsimple); /*see oem_supermicro.c*/
+ int slen, int fsimple, char fdbg); /*see oem_supermicro.c*/
extern int decode_sensor_quanta(uchar *sdr,uchar *reading,char *pstring,
int slen); /*see oem_quanta.c*/
extern int decode_sensor_dell(uchar *sdr,uchar *reading,char *pstring,
@@ -255,7 +255,7 @@ char *decode_entity_id(int id) {
* Global Data
************************/
static char *progname = "isensor";
-static char *progver = "3.04";
+static char *progver = "3.07";
#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);
}
@@ -1952,7 +1952,7 @@ int decode_oem_sensor(uchar *sdr,uchar *reading,char *pstring,int slen)
case VENDOR_MAGNUM:
case VENDOR_SUPERMICRO:
case VENDOR_SUPERMICROX:
- rv = decode_sensor_supermicro(sdr, reading, pstring, slen, fsimple);
+ rv = decode_sensor_supermicro(sdr,reading,pstring,slen,fsimple,fdebug);
break;
case VENDOR_QUANTA:
rv = decode_sensor_quanta(sdr, reading, pstring, slen);
@@ -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);