From dcc89cc2006fea0ca21fbe267930a0ac3c850b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 13 Aug 2017 17:06:45 +0200 Subject: New upstream version 3.0.6 --- util/isensor.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'util/isensor.c') 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); -- cgit v1.2.3