summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-02-24 21:18:15 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-02-24 21:18:15 +0100
commite6806f1d217e07f52759e4fa1c792d1fe02f0d50 (patch)
tree9d88be25642b4dee4821a135522615970ac8e59f /util
parentf85b8b834b7ff85c80503faa73f237040330087b (diff)
New upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'util')
-rw-r--r--util/Makefile.am2
-rw-r--r--util/Makefile.in5
-rw-r--r--util/ialarms.c2
-rw-r--r--util/icmd.c2
-rw-r--r--util/iconfig.c2
-rw-r--r--util/idcmi.c2
-rw-r--r--util/ievents.c7
-rw-r--r--util/ifirewall.c2
-rw-r--r--util/ifru.c2
-rw-r--r--util/ifruset.c2
-rw-r--r--util/igetevent.c2
-rw-r--r--util/ihealth.c30
-rw-r--r--util/ilan.c2
-rw-r--r--util/ipicmg.c2
-rw-r--r--util/ipmicmd.h1
-rw-r--r--util/ipmiutil.c2
-rw-r--r--util/ipmiutil.mak4
-rw-r--r--util/ipmiutil64.mak4
-rw-r--r--util/ireset.c2
-rw-r--r--util/isel.c2
-rw-r--r--util/iseltime.c2
-rw-r--r--util/isensor.c22
-rw-r--r--util/iserial.c2
-rw-r--r--util/isol.c2
-rw-r--r--util/itsol.c2
-rw-r--r--util/iwdt.c2
-rw-r--r--util/oem_asus.c278
-rw-r--r--util/oem_dell.c6
-rw-r--r--util/oem_kontron.c22
-rw-r--r--util/oem_lenovo.c27
-rw-r--r--util/oem_sun.c2
-rw-r--r--util/oem_supermicro.c36
-rw-r--r--util/subs.c3
33 files changed, 396 insertions, 89 deletions
diff --git a/util/Makefile.am b/util/Makefile.am
index 583cbe5..3293943 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -23,7 +23,7 @@ CMDMOD += ipmilanplus.c
# CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@
# am: configure substitutions are not allowed in _SOURCES variables
LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@
-OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c iekanalyzer.c
+OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c oem_asus.c iekanalyzer.c
L2OBJ = @SAM2OBJ@
AM_CPPFLAGS += -I. -I.. -DMETACOMMAND
diff --git a/util/Makefile.in b/util/Makefile.in
index bf37fdf..30be248 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -73,7 +73,7 @@ ipmi_sample_evt_DEPENDENCIES = $(am__DEPENDENCIES_1)
am__objects_1 = oem_kontron.$(OBJEXT) oem_fujitsu.$(OBJEXT) \
oem_intel.$(OBJEXT) oem_sun.$(OBJEXT) oem_supermicro.$(OBJEXT) \
oem_dell.$(OBJEXT) oem_quanta.$(OBJEXT) oem_hp.$(OBJEXT) \
- oem_newisys.$(OBJEXT) oem_lenovo.$(OBJEXT) \
+ oem_newisys.$(OBJEXT) oem_lenovo.$(OBJEXT) oem_asus.$(OBJEXT) \
iekanalyzer.$(OBJEXT)
am__objects_2 = ipmicmd.$(OBJEXT) mem_if.$(OBJEXT) ipmidir.$(OBJEXT) \
imbapi.$(OBJEXT) ipmimv.$(OBJEXT) ipmild.$(OBJEXT) \
@@ -295,7 +295,7 @@ CMDMOD = ipmicmd.c mem_if.c ipmidir.c imbapi.c ipmimv.c ipmild.c \
# CMDMOD = ipmicmd.c mem_if.c @OS_DRIVERS@
# am: configure substitutions are not allowed in _SOURCES variables
LIBOBJ = ipmicmd.o mem_if.o ipmidir.o imbapi.o ipmimv.o ipmild.o ipmibmc.o ipmilipmi.o subs.o md5.o md2.o $(tmpobj)/ipmilan.o $(tmpobj)/ipmilanplus.o @LIBSENSORS@
-OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c iekanalyzer.c
+OEMMOD = oem_kontron.c oem_fujitsu.c oem_intel.c oem_sun.c oem_supermicro.c oem_dell.c oem_quanta.c oem_hp.c oem_newisys.c oem_lenovo.c oem_asus.c iekanalyzer.c
L2OBJ = @SAM2OBJ@
METASOURCE = ipmiutil.c ialarms.c ihealth.c ievents.c ifru.c ifru_picmg.c igetevent.c ireset.c icmd.c ilan.c isensor.c isel.c iserial.c iwdt.c isol.c idiscover.c iconfig.c ipicmg.c ifirewall.c ifwum.c ihpm.c itsol.c idcmi.c $(OEMMOD) $(CMDMOD)
LANPLUS_OBJ = $(shell ar t @LANPLUS_LIB@ 2>/dev/null)
@@ -480,6 +480,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem_if.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_asus.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_dell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_fujitsu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oem_hp.Po@am__quote@
diff --git a/util/ialarms.c b/util/ialarms.c
index afa8073..3fa821b 100644
--- a/util/ialarms.c
+++ b/util/ialarms.c
@@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ialarms";
static char fdebug = 0;
static char fbmctam = 0;
diff --git a/util/icmd.c b/util/icmd.c
index 04763ae..d2f7508 100644
--- a/util/icmd.c
+++ b/util/icmd.c
@@ -78,7 +78,7 @@ extern void ipmi_lan_set_timeout(int ipmito, int tries, int pingto);
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "icmd";
static char fdebug = 0;
static char fquiet = 0;
diff --git a/util/iconfig.c b/util/iconfig.c
index ede54ff..dd43225 100644
--- a/util/iconfig.c
+++ b/util/iconfig.c
@@ -172,7 +172,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "iconfig";
static char fdebug = 0;
static char fipmilan = 0;
diff --git a/util/idcmi.c b/util/idcmi.c
index 65342d6..fcadbac 100644
--- a/util/idcmi.c
+++ b/util/idcmi.c
@@ -62,7 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "idcmi.h"
static char * progname = "idcmi";
-static char * progver = "3.01";
+static char * progver = "3.02";
extern char fdebug; /*from ipmicmd.c*/
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/ievents.c b/util/ievents.c
index 1e7f8e2..284343b 100644
--- a/util/ievents.c
+++ b/util/ievents.c
@@ -76,7 +76,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define SELprintf printf
#define SMS_SA 0x41
#define SMI_SA 0x21
-static char *progver = "3.01";
+static char *progver = "3.02";
static char *progname = "ievents";
static char fsensdesc = 0; /* 1= get extended sensor descriptions*/
static char fcanonical = 0; /* 1= show canonical, delimited output*/
@@ -397,7 +397,7 @@ char * avail_str[N_AVAIL] = { /* Discrete Availability, evtype 0x0A */
/*08*/ "Install Error"};
-#define NSDESC 87
+#define NSDESC 88
struct {
ushort genid; /* generator id: BIOS, BMC, etc. (slave_addr/channel) */
uchar s_typ; /* 1=temp,2=voltage,4=fan,... */
@@ -457,9 +457,10 @@ struct {
{HSC_SA,0x0d, 0xff, 0x08, 0x01,0xff,0xff, 0,"Device Inserted"}, /*HSC*/
{0xffff,0x0d, 0xff, 0x6f, 0x00,0xff,0xff, 0,"Drive present"}, /*Romley BMC*/
{0xffff,0x0d, 0xff, 0xef, 0x00,0xff,0xff, 0,"Drive removed"}, /*BMC*/
-{0xffff,0x0d, 0xff, 0x6f, 0x01,0xff,0xff, 2,"Drive fault"},
+{0xffff,0x0d, 0xff, 0x6f, 0x01,0xff,0xff, 2,"Drive fault"}, /*0x0D Drive*/
{0xffff,0x0d, 0xff, 0xef, 0x01,0xff,0xff, 0,"Drive fault OK"},
{0xffff,0x0d, 0xff, 0x6f, 0x02,0xff,0xff, 1,"Drive predict fail"},
+{0xffff,0x0d, 0xff, 0x6f, 0x05,0xff,0xff, 1,"Drive not redundant"},
{0xffff,0x0d, 0xff, 0x6f, 0x07,0xff,0xff, 0,"Rebuild in progress"},
{0xffff,0x0d, 0xff, 0xef, 0x07,0xff,0xff, 0,"Rebuild complete"},
{0xffff,0x14, 0xff, 0xff, 0x42,0xff,0xff, 1,"Reset Button pressed"},
diff --git a/util/ifirewall.c b/util/ifirewall.c
index 7938cd9..25954e5 100644
--- a/util/ifirewall.c
+++ b/util/ifirewall.c
@@ -64,7 +64,7 @@
/* global variables */
static char * progname = "ifirewall";
-static char * progver = "3.01";
+static char * progver = "3.02";
static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/ifru.c b/util/ifru.c
index f9d35df..9ddfd8b 100644
--- a/util/ifru.c
+++ b/util/ifru.c
@@ -116,7 +116,7 @@ extern int ipmi_kontronoem_main(void * intf, int argc, char ** argv);
#endif
static char *progname = "ifru";
-static char *progver = "3.01";
+static char *progver = "3.02";
static int vend_id = 0;
static int prod_id = 0;
static char fdebug = 0;
diff --git a/util/ifruset.c b/util/ifruset.c
index 360b84b..b29800d 100644
--- a/util/ifruset.c
+++ b/util/ifruset.c
@@ -106,7 +106,7 @@ extern void fmt_time(time_t etime, char *buf, int bufsz); /*see ievents.c*/
#define IPROD_OEM 7
static char *progname = "ifruset";
-static char *progver = "3.01";
+static char *progver = "3.02";
static char fdebug = 0;
static char fpicmg = 0;
static char fonlybase = 0;
diff --git a/util/igetevent.c b/util/igetevent.c
index 4b0de05..49476bd 100644
--- a/util/igetevent.c
+++ b/util/igetevent.c
@@ -169,7 +169,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/
* Global variables
*/
static char * progname = "igetevent";
-static char * progver = "3.01";
+static char * progver = "3.02";
static char fdebug = 0;
static char fipmilan = 0;
static char frunonce = 0;
diff --git a/util/ihealth.c b/util/ihealth.c
index db228bf..2ff5ba8 100644
--- a/util/ihealth.c
+++ b/util/ihealth.c
@@ -82,7 +82,7 @@ extern int oem_supermicro_get_firmware_str(char *pstr, int sz); /*oem_supermicro
* Global variables
*/
static char * progname = "ihealth";
-static char * progver = "3.01";
+static char * progver = "3.02";
static char fdebug = 0;
static char fipmilan = 0;
static char fcanonical = 0;
@@ -634,11 +634,6 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)
if (prod >= 0x200) prodstr = "(iRMC S2)";
else prodstr = "";
break;
- case VENDOR_LENOVO:
- case VENDOR_LENOVO2:
- if (prod == 0x143) prodstr = "(x3650 M4)";
- else prodstr = "";
- break;
case VENDOR_CISCO: /*=0x00168b, 5771.*/
if (prod == 0x0005) prodstr = "(UCS C200)";
else prodstr = "";
@@ -731,12 +726,12 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)
switch(prod) { /* show product names for some */
case 0x2000: prodstr = "(Proliant ML/DL)"; break; /*DL380*/
case 0x2020: prodstr = "(Proliant BL)"; break;
- default: if ((prod & 0xff00) == 0x8300)
- prodstr = "(Proliant SL)";
- else prodstr = "";
- break;
+ default:
+ if ((prod & 0xff00) == 0x8300) prodstr = "(Proliant SL)";
+ else prodstr = "";
+ break;
}
- do_powerstate = 0; /*HP does not support get_power_state cmd*/
+ do_powerstate = 0; /*HP does not support get_power_state cmd*/
break;
case VENDOR_DELL: /*=0x0002A2*/
switch(prod) { /* show product names for some */
@@ -785,11 +780,18 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)
default: prodstr = ""; break;
}
break;
+ case VENDOR_LENOVO:
+ case VENDOR_LENOVO2:
+ if (prod == 0x143) prodstr = "(x3650 M4)";
+ else prodstr = "";
+ break;
case VENDOR_IBM: /*=0x0002*/
switch(prod) { /* show product names for some */
- case 0x000e: prodstr = "(x3755)"; break;
- case 0x00dc: prodstr = "(x3650)"; break;
- case 0x8848: prodstr = "(eServer 360S)"; break;
+ case 0x000e: prodstr = "(x3755)"; break;
+ case 0x0011: prodstr = "(x3650)"; break;
+ case 0x00dc: prodstr = "(x3650 M2)"; break; /*M2,M3*/
+ case 0x00fa: prodstr = "(x3850 X5)"; break;
+ case 0x8848: prodstr = "(eServer 360S)"; break;
default: prodstr = ""; break;
}
break;
diff --git a/util/ilan.c b/util/ilan.c
index 0c47e4d..6f4d448 100644
--- a/util/ilan.c
+++ b/util/ilan.c
@@ -305,7 +305,7 @@ extern char *get_sensor_type_desc(uchar stype); /*from ievents.c*/
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ilan";
static char fdebug = 0;
static char fipmilan = 0;
diff --git a/util/ipicmg.c b/util/ipicmg.c
index 735ad87..b0f1a03 100644
--- a/util/ipicmg.c
+++ b/util/ipicmg.c
@@ -81,7 +81,7 @@
/* Global data */
static char * progname = "ipicmg";
-static char * progver = "3.01";
+static char * progver = "3.02";
static char fdebug = 0;
static char fset_mc = 0;
static uint8_t g_bus = PUBLIC_BUS;
diff --git a/util/ipmicmd.h b/util/ipmicmd.h
index 9e13d4e..5fccaea 100644
--- a/util/ipmicmd.h
+++ b/util/ipmicmd.h
@@ -314,6 +314,7 @@ struct oemvalstr {
#define VENDOR_CISCO 5771 /*=0x168B*/
#define VENDOR_LENOVO 0x004A66
#define VENDOR_LENOVO2 0x004F4D
+#define VENDOR_ASUS 0x000A3F
#define PRODUCT_QUANTA_S99Q 21401
#define PRODUCT_QUANTA_QSSC_S4R 64 /*0x0040*/
diff --git a/util/ipmiutil.c b/util/ipmiutil.c
index 43acf40..5fec907 100644
--- a/util/ipmiutil.c
+++ b/util/ipmiutil.c
@@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ipmiutil.h"
static char *progname = "ipmiutil";
-static char *progver = "3.01";
+static char *progver = "3.02";
// static char fdebug = 0;
/*int ipmiutil(int argc, char **argv); */
diff --git a/util/ipmiutil.mak b/util/ipmiutil.mak
index 021851a..c3963a0 100644
--- a/util/ipmiutil.mak
+++ b/util/ipmiutil.mak
@@ -86,6 +86,7 @@ E_OBJ=$(TMP_D)\ipmiutil.obj \
$(TMP_D)\iekanalyzer.obj $(TMP_D)\ifru_picmg.obj \
$(TMP_D)\oem_kontron.obj $(TMP_D)\ihpm.obj $(TMP_D)\ifwum.obj \
$(TMP_D)\oem_fujitsu.obj $(TMP_D)\oem_intel.obj $(TMP_D)\oem_lenovo.obj \
+ $(TMP_D)\oem_asus.obj \
$(TMP_D)\oem_sun.obj $(TMP_D)\oem_dell.obj $(TMP_D)\oem_hp.obj \
$(TMP_D)\oem_supermicro.obj $(TMP_D)\itsol.obj $(TMP_D)\idcmi.obj \
$(TMP_D)\oem_quanta.obj $(TMP_D)\oem_newisys.obj $(CMD_OBJ) mem_if.obj
@@ -333,6 +334,9 @@ $(TMP_D)\oem_supermicro.obj: oem_supermicro.c
$(TMP_D)\oem_lenovo.obj: oem_lenovo.c
$(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_lenovo.obj oem_lenovo.c
+$(TMP_D)\oem_asus.obj: oem_asus.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_asus.obj oem_asus.c
+
$(TMP_D)\oem_quanta.obj: oem_quanta.c
$(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_quanta.obj oem_quanta.c
diff --git a/util/ipmiutil64.mak b/util/ipmiutil64.mak
index 27f0a50..6c8825e 100644
--- a/util/ipmiutil64.mak
+++ b/util/ipmiutil64.mak
@@ -86,6 +86,7 @@ E_OBJ=$(TMP_D)\ipmiutil.obj \
$(TMP_D)\iekanalyzer.obj $(TMP_D)\ifru_picmg.obj \
$(TMP_D)\oem_kontron.obj $(TMP_D)\ihpm.obj $(TMP_D)\ifwum.obj \
$(TMP_D)\oem_fujitsu.obj $(TMP_D)\oem_intel.obj $(TMP_D)\oem_lenovo.obj \
+ $(TMP_D)\oem_asus.obj \
$(TMP_D)\oem_sun.obj $(TMP_D)\oem_dell.obj $(TMP_D)\oem_hp.obj \
$(TMP_D)\oem_supermicro.obj $(TMP_D)\itsol.obj $(TMP_D)\idcmi.obj \
$(TMP_D)\oem_quanta.obj $(TMP_D)\oem_newisys.obj $(CMD_OBJ) mem_if.obj
@@ -333,6 +334,9 @@ $(TMP_D)\oem_supermicro.obj: oem_supermicro.c
$(TMP_D)\oem_lenovo.obj: oem_lenovo.c
$(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_lenovo.obj oem_lenovo.c
+$(TMP_D)\oem_asus.obj: oem_asus.c
+ $(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_asus.obj oem_asus.c
+
$(TMP_D)\oem_quanta.obj: oem_quanta.c
$(CC) /c $(CFLAGS_M) /Fo$(TMP_D)\oem_quanta.obj oem_quanta.c
diff --git a/util/ireset.c b/util/ireset.c
index d0d30de..434676f 100644
--- a/util/ireset.c
+++ b/util/ireset.c
@@ -108,7 +108,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ireset";
static uchar ipmi_maj;
static uchar ipmi_min;
diff --git a/util/isel.c b/util/isel.c
index 909e28c..83752eb 100644
--- a/util/isel.c
+++ b/util/isel.c
@@ -162,7 +162,7 @@ typedef struct
#define RDATA_OFFSET 13 //byte offset to the record event data
static char *progname = "isel";
-static char *progver = "3.01";
+static char *progver = "3.02";
#ifdef WIN32
#define IDXFILE "sel.idx"
static char idxfile[80] = IDXFILE;
diff --git a/util/iseltime.c b/util/iseltime.c
index a61fd34..ba0013d 100644
--- a/util/iseltime.c
+++ b/util/iseltime.c
@@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "iseltime";
static char fdebug = 0;
static char fset = 0;
diff --git a/util/isensor.c b/util/isensor.c
index 9456613..7dd746e 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -168,6 +168,7 @@ extern int decode_sensor_dell(uchar *sdr,uchar *reading,char *pstring,
int slen); /*see oem_dell.c*/
extern int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring,
int slen); /*see oem_lenovo.c*/
+extern int decode_sensor_asus(uchar *sdr,uchar *reading,char *pstring,int slen);
extern int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring,
int slen); /*see oem_hp.c*/
extern void show_oemsdr_hp(uchar *sdr);
@@ -254,7 +255,7 @@ char *decode_entity_id(int id) {
* Global Data
************************/
static char *progname = "isensor";
-static char *progver = "3.01";
+static char *progver = "3.02";
#ifdef WIN32
static char savefile[] = "%ipmiutildir%\\thresholds.cmd";
#else
@@ -1962,14 +1963,18 @@ int decode_oem_sensor(uchar *sdr,uchar *reading,char *pstring,int slen)
case VENDOR_DELL:
rv = decode_sensor_dell(sdr, reading, pstring, slen);
break;
+ case VENDOR_IBM:
case VENDOR_LENOVO:
case VENDOR_LENOVO2:
rv = decode_sensor_lenovo(sdr, reading, pstring, slen);
break;
+ case VENDOR_ASUS:
+ rv = decode_sensor_asus(sdr, reading, pstring, slen);
+ break;
default:
break;
} /*end-switch vend_id*/
- if (fdebug && rv == 0)
+ if (fdebug) // && rv == 0)
printf("decode_oem_sensor rv=%d vend=%x string=%s\n",rv,vend_id,pstring);
#endif
return (rv);
@@ -2363,7 +2368,7 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,
if (reading1 & 0x02) istr = 9; /*Present/Inserted*/
else if (reading1 & 0x01) istr = 10; /*Absent/Removed*/
else /*reading1==00*/ istr = 47; /*Unused*/
- } else { /* HSC slot status sensors (evtype==0x6f) */
+ } else { /* HSC slot status sensors (evtype==0x6f)*/
/* usually reading2 == 0x82 or 0x8E if healthy */
if (reading2 & 0x01) istr = 12; /*state8=Rebuild stopped*/
else if (reading2 & 0x02) istr = 11; /*state9=Inserted/Ready */
@@ -2371,7 +2376,7 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,
else if (reading2 & 0x08) istr = 11; /*state11=Ready */
else if (reading2 == 0x80) istr = 47; /*no states, Unused*/
else istr = 12; /*faulty*/
- b = 8; /*if no bits set, no raid state */
+ b = 8; /*if no bits set, no raid state */
if (reading1 & 0x01) { b = 0; } /*state0=Faulty*/
else if (reading1 & 0x02) b = 1; /*state1=Rebuilding*/
else if (reading1 & 0x04) b = 2; /*state2=InFailedArray*/
@@ -2380,15 +2385,15 @@ decode_comp_reading(uchar type, uchar evtype, uchar num,
else if (reading1 & 0x20) b = 5; /*state5=PredictedFault*/
else if (reading1 & 0x40) b = 6; /*state6=Un-configured*/
else if (reading1 & 0x80) b = 7; /*state7=HotSpare*/
- if (b < 8) {
+ if (b < 8) {
/* also include a raid_state, via custom string */
sprintf(customstr,"%s %s",
sensor_dstatus[istr], raid_states[b]);
istr = STR_CUSTOM;
sensor_dstatus[istr] = customstr;
if (fdebug) printf("dstatus=%s\n",sensor_dstatus[istr]);
- }
- } /*end-else HSC slot status*/
+ }
+ } /*end-else-if HSC slot status (0x6f)*/
}
break;
case 0x10: /*Event Logging*/
@@ -2662,7 +2667,8 @@ ShowSDR(char *tag, uchar *sdr)
}
rc = decode_oem_sensor(sdr,sens,oem_string,sizeof(oem_string));
if (rc == 0) {
- strncpy(rdgstr,oem_string,sizeof(rdgstr));
+ if (fsimple) strncpy(rdgstr,oem_string,sizeof(rdgstr));
+ else snprintf(rdgstr,sizeof(rdgstr),"%02x %s",sens[0],oem_string);
} else {
if (fsimple)
snprintf(rdgstr,sizeof(rdgstr),"%s %c %.2f %s",
diff --git a/util/iserial.c b/util/iserial.c
index e0cc7e9..14de25c 100644
--- a/util/iserial.c
+++ b/util/iserial.c
@@ -155,7 +155,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "iserial";
static int vend_id = 0;
static int prod_id = 0;
diff --git a/util/isol.c b/util/isol.c
index 0dd7f22..6fc13f8 100644
--- a/util/isol.c
+++ b/util/isol.c
@@ -165,7 +165,7 @@ void dbglog( char *pattn, ... ); /*local prototype*/
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "isol";
static char fdebug = 0;
static char fpicmg = 0;
diff --git a/util/itsol.c b/util/itsol.c
index 67ff688..540b73b 100644
--- a/util/itsol.c
+++ b/util/itsol.c
@@ -98,7 +98,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz);
extern int verbose;
extern char fdebug; /*from ipmicmd.c*/
static char * progname = "itsol";
-static char * progver = "3.01";
+static char * progver = "3.02";
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
static uchar g_lun = BMC_LUN;
diff --git a/util/iwdt.c b/util/iwdt.c
index 121270a..89f4c52 100644
--- a/util/iwdt.c
+++ b/util/iwdt.c
@@ -100,7 +100,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Global variables
*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "iwdt";
static char fdebug = 0;
static char fdontlog = 0;
diff --git a/util/oem_asus.c b/util/oem_asus.c
new file mode 100644
index 0000000..24226b9
--- /dev/null
+++ b/util/oem_asus.c
@@ -0,0 +1,278 @@
+/*
+ * oem_asus.c
+ * Handle ASUS OEM command functions
+ *
+ * Author: Andy Cress arcress at users.sourceforge.net
+ * Change history:
+ * 01/23/2017 ARCress - created
+ *
+ *---------------------------------------------------------------------
+ */
+/*M*
+Copyright (c) 2016 Andy Cress
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ a.. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ b.. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ c.. Neither the name of the copyright holder nor the names of contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *M*/
+#ifdef WIN32
+#include <windows.h>
+#include "getopt.h"
+#else
+#if defined(HPUX)
+/* getopt is defined in stdio.h */
+#elif defined(MACOS)
+/* getopt is defined in unistd.h */
+#include <unistd.h>
+#include <sys/time.h>
+#else
+#include <getopt.h>
+#endif
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include "ipmicmd.h"
+#include "ievents.h"
+
+extern uchar bitnum(ushort value); /*isensor.c*/
+extern char fdebug; /*ipmicmd.c*/
+void set_loglevel(int level); /*prototype */
+
+static char * progver = "3.02";
+static char * progname = "ioemasus";
+static int verbose = 0;
+static uchar g_bus = PUBLIC_BUS;
+static uchar g_sa = BMC_SA;
+static uchar g_lun = BMC_LUN;
+static uchar g_addrtype = ADDR_SMI;
+static int vend_id = 0;
+static int prod_id = 0;
+
+/*
+ * decode_sensor_asus
+ * inputs:
+ * sdr = the SDR buffer
+ * reading = the 3 or 4 bytes of data from GetSensorReading
+ * pstring = points to the output string buffer
+ * slen = size of the output buffer
+ * outputs:
+ * rv = 0 if this sensor was successfully interpreted here,
+ * non-zero otherwise, to use default interpretations.
+ * pstring = contains the sensor reading interpretation string (if rv==0)
+ */
+int decode_sensor_asus(uchar *sdr,uchar *reading,char *pstring, int slen)
+{
+ int rv = -1;
+ uchar stype, etype, entity;
+ uchar bval;
+ ushort rval;
+ char *pstr = NULL;
+ int b;
+
+ if (sdr == NULL || reading == NULL) return(rv);
+ if (pstring == NULL || slen == 0) return(rv);
+ /* sdr[3] is 0x01 for Full, 0x02 for Compact */
+ bval = reading[2];
+ if (sdr[3] == 0x01) return(rv); /*skip if full sensor*/
+ entity = sdr[8];
+ stype = sdr[12];
+ etype = sdr[13];
+ rval = reading[2] | ((reading[3] & 0x7f) << 8);
+ b = bitnum(rval);
+ if (fdebug) printf("oem_asus: sensor type=%x evt=%x entity=%x rval=%04x\n",
+ stype,etype,entity,rval);
+ switch(stype) {
+ case 0xC5: /* OEM for Memory_Train_Err */
+ if (etype == 0x6F) {
+ switch(bval) {
+ case 0x00: pstr = "OK"; break;
+ default: pstr = "Error"; break;
+ }
+ snprintf(pstring,slen,"%s",pstr);
+ rv = 0;
+ }
+ break;
+ default: break;
+ }
+ return(rv);
+}
+
+/*
+ * decode_sel_asus
+ * inputs:
+ * evt = the 16-byte IPMI SEL event
+ * outbuf = points to the output string buffer
+ * outsz = size of the output buffer
+ * outputs:
+ * rv = 0 if this event was successfully interpreted here,
+ * non-zero otherwise, to use default interpretations.
+ * outbuf = will contain the interpreted event text string (if rv==0)
+ */
+int decode_sel_asus(uchar *evt, char *outbuf, int outsz, char fdesc,
+ char fdbg)
+{
+ int rv = -1;
+ ushort id;
+ uchar rectype;
+ ulong timestamp;
+ char mybuf[64];
+ char *type_str = "";
+ char *pstr = NULL;
+ int sevid;
+ ushort genid;
+ uchar snum;
+ uchar data1, data2, data3;
+
+ fdebug = fdbg;
+ sevid = SEV_INFO;
+ id = evt[0] + (evt[1] << 8);
+ rectype = evt[2];
+ snum = evt[11];
+ timestamp = evt[3] + (evt[4] << 8) + (evt[5] << 16) + (evt[6] << 24);
+ genid = evt[7] | (evt[8] << 8);
+ data1 = evt[13];
+ data2 = evt[14];
+ data3 = evt[15];
+ if (rectype == 0x02)
+ {
+ sprintf(mybuf,"%02x [%02x %02x %02x]", evt[12],data1,data2,data3);
+ switch(evt[10]) { /*sensor type*/
+ case 0xC0: /* OEM type */
+ type_str = "OEM_type";
+ pstr = "OEM Sensor ";
+ sevid = SEV_MAJ;
+ rv = -1;
+ break;
+ default: /*other sensor types*/
+ break;
+ }
+ }
+ if (rv == 0) {
+ format_event(id,timestamp, sevid, genid, type_str,
+ snum,NULL,pstr,mybuf,outbuf,outsz);
+ }
+ return(rv);
+}
+
+static void usage(void)
+{
+ printf("Usage: %s <command> [arg]\n",progname);
+ printf("These commands may not work on all Lenovo systems\n");
+}
+
+static int ipmi_oemasus_main(int argc, char **argv)
+{
+ int rv = 0;
+
+ if (strncmp(argv[0],"other",9) == 0) {
+ usage();
+ rv = ERR_USAGE;
+ } else {
+ usage();
+ rv = ERR_USAGE;
+ }
+ return(rv);
+}
+
+#ifdef METACOMMAND
+int i_oemasus(int argc, char **argv)
+#else
+#ifdef WIN32
+int __cdecl
+#else
+int
+#endif
+main(int argc, char **argv)
+#endif
+{
+ int rv = 0;
+ uchar devrec[16];
+ int c, i;
+ char *s1;
+
+ printf("%s ver %s\n", progname,progver);
+ set_loglevel(LOG_NOTICE);
+ parse_lan_options('V',"4",0); /*default to admin priv*/
+
+ while ( (c = getopt( argc, argv,"m:xzEF:J:N:P:R:T:U:V:YZ:?")) != EOF )
+ switch(c) {
+ case 'm': /* specific IPMB MC, 3-byte address, e.g. "409600" */
+ g_bus = htoi(&optarg[0]); /*bus/channel*/
+ g_sa = htoi(&optarg[2]); /*device slave address*/
+ g_lun = htoi(&optarg[4]); /*LUN*/
+ g_addrtype = ADDR_IPMB;
+ if (optarg[6] == 's') {
+ g_addrtype = ADDR_SMI; s1 = "SMI";
+ } else { g_addrtype = ADDR_IPMB; s1 = "IPMB"; }
+ ipmi_set_mc(g_bus,g_sa,g_lun,g_addrtype);
+ printf("Use MC at %s bus=%x sa=%x lun=%x\n",
+ s1,g_bus,g_sa,g_lun);
+ break;
+ case 'x': fdebug = 2; /* normal (dbglog if isol) */
+ verbose = 1;
+ break;
+ case 'z': fdebug = 3; /*full debug (for isol)*/
+ verbose = 1;
+ break;
+ case 'N': /* nodename */
+ case 'U': /* remote username */
+ case 'P': /* remote password */
+ case 'R': /* remote password */
+ case 'E': /* get password from IPMI_PASSWORD environment var */
+ case 'F': /* force driver type */
+ case 'T': /* auth type */
+ case 'J': /* cipher suite */
+ case 'V': /* priv level */
+ case 'Y': /* prompt for remote password */
+ case 'Z': /* set local MC address */
+ parse_lan_options(c,optarg,fdebug);
+ break;
+ default:
+ usage();
+ return(ERR_USAGE);
+ break;
+ }
+ for (i = 0; i < optind; i++) { argv++; argc--; }
+ if (argc == 0) {
+ usage();
+ return(ERR_USAGE);
+ }
+
+ rv = ipmi_getdeviceid(devrec,16,fdebug);
+ if (rv == 0) {
+ char ipmi_maj, ipmi_min;
+ ipmi_maj = devrec[4] & 0x0f;
+ ipmi_min = devrec[4] >> 4;
+ vend_id = devrec[6] + (devrec[7] << 8) + (devrec[8] << 16);
+ prod_id = devrec[9] + (devrec[10] << 8);
+ show_devid( devrec[2], devrec[3], ipmi_maj, ipmi_min);
+ }
+
+ rv = ipmi_oemasus_main(argc, argv);
+
+ ipmi_close_();
+ return(rv);
+}
+/* end oem_asus.c */
diff --git a/util/oem_dell.c b/util/oem_dell.c
index 0389355..c806e94 100644
--- a/util/oem_dell.c
+++ b/util/oem_dell.c
@@ -132,7 +132,7 @@ char NIC_Selection_Mode_String_12g[] [50] = {
"shared with failover all loms"
};
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "idelloem";
static int verbose = 0;
static char fdebug = 0;
@@ -5445,8 +5445,8 @@ int decode_sensor_dell(uchar *sdr,uchar *reading,char *pstring, int slen)
if (stype == 0x02) { /* Discrete Voltage */
/* Dell Discrete Voltage is opposite from normal */
if (evtype == 0x03) { /*oem interpretation */
- if (reading[2] & 0x01) strncpy(pstring,"OK",slen);
- else strncpy(pstring,"Exceeded",slen); /*LimitExceeded*/
+ if (reading[2] & 0x01) strncpy(pstring,"OK",slen);
+ else strncpy(pstring,"Exceeded",slen); /*LimitExceeded*/
rv = 0;
}
}
diff --git a/util/oem_kontron.c b/util/oem_kontron.c
index 259fbdc..891075a 100644
--- a/util/oem_kontron.c
+++ b/util/oem_kontron.c
@@ -943,19 +943,19 @@ int decode_sel_kontron(uint8_t *evt, char *outbuf, int outsz, char fdesc,
if (rectype == 0xc1) { /* OEM type C1 */
oemid = evt[7] + (evt[8] << 8) + (evt[9] << 16);
if (oemid == VENDOR_KONTRON) {
- fmt_time(timestamp, timestr, sizeof(timestr));
- type_str = "Kontron";
- gstr = "BMC ";
- switch(evt[10]) {
- case 0x01:
- default:
- sprintf(mybuf,"OEM Event %02x %02x %02x %02x %02x %02x",
+ fmt_time(timestamp, timestr, sizeof(timestr));
+ type_str = "Kontron";
+ gstr = "BMC ";
+ switch(evt[10]) {
+ case 0x01:
+ default:
+ sprintf(mybuf,"OEM Event %02x %02x %02x %02x %02x %02x",
evt[10], evt[11], evt[12], evt[13], evt[14], evt[15]);
- break;
- }
- snprintf(outbuf, outsz, "%04x %s %s %s %s %s\n",
+ break;
+ }
+ snprintf(outbuf, outsz, "%04x %s %s %s %s %s\n",
id,timestr,get_sev_str(sevid), gstr, type_str, mybuf);
- rv = 0;
+ rv = 0;
} /*endif kontron*/
} else if (rectype == 0x02) {
type_str = "";
diff --git a/util/oem_lenovo.c b/util/oem_lenovo.c
index 9c5079f..a1162bb 100644
--- a/util/oem_lenovo.c
+++ b/util/oem_lenovo.c
@@ -57,12 +57,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ievents.h"
#include "oem_lenovo.h"
+extern uchar bitnum(ushort value); /*isensor.c*/
+extern char fdebug; /*ipmicmd.c*/
void set_loglevel(int level); /*prototype */
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ioemlenovo";
static int verbose = 0;
-static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
static uchar g_lun = BMC_LUN;
@@ -70,7 +71,6 @@ static uchar g_addrtype = ADDR_SMI;
static int vend_id = 0;
static int prod_id = 0;
-extern uchar bitnum(ushort value); /*isensor.c*/
/*
* decode_sensor_lenovo
@@ -116,7 +116,18 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
case 0x08: pstr = "Disabled"; break;
default: pstr = "OK*"; break;
}
- snprintf(pstring,slen,"%04x %s",bval,pstr);
+ rv = 0;
+ }
+ break;
+ case 0x0D: /* Disk Drive slots */
+ if (etype == 0x6F) {
+ switch(bval) {
+ case 0x00: pstr = "Absent"; break;
+ case 0x01: pstr = "Present"; break;
+ case 0x21: pstr = "NotRedundant"; break;
+ case 0x40: pstr = "NotAvailable"; break; /*not initialized*/
+ default: pstr = "Faulty"; break; /*e.g. 0x03*/
+ }
rv = 0;
}
break;
@@ -126,7 +137,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
else if (bval & 0x01) pstr = "FirmwareError"; /*bit 0*/
else if ((bval & 0x02) != 0) pstr = "FirmwareHang"; /*bit 1*/
else pstr = "OK*";
- snprintf(pstring,slen,"%04x %s",bval,pstr);
rv = 0;
}
break;
@@ -138,7 +148,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
case 0x02: pstr = "CableError"; break;
default: pstr = "OK*"; break;
}
- snprintf(pstring,slen,"%04x %s",rval,pstr);
rv = 0;
}
break;
@@ -148,14 +157,12 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
case 0x00: pstr = "OK"; break; /*No Media*/
default: pstr = "Asserted"; break;
}
- snprintf(pstring,slen,"%04x %s",rval,pstr);
rv = 0;
}
case 0x21: /*All PCI Error, PCI 1, Internal RAID, No Op ROM, etc.*/
if (etype == 0x6F) {
if (bval == 0x00) pstr = "OK";
else pstr = "Fault";
- snprintf(pstring,slen,"%04x %s",bval,pstr);
rv = 0;
}
break;
@@ -180,7 +187,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
case 0x07: pstr = "ChangedOK"; break; /*entity 21,22*/
default: pstr = "_"; break;
}
- snprintf(pstring,slen,"%04x %s",rval,pstr);
rv = 0;
}
break;
@@ -188,7 +194,6 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
if (etype == 0x07) {
if ((bval & 0x04) != 0) pstr = "Faulty";
else pstr = "OK";
- snprintf(pstring,slen,"%04x %s",bval,pstr);
rv = 0;
}
break;
@@ -196,12 +201,12 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
if (etype == 0x08) {
if ((bval & 0x02) != 0) pstr = "Faulty";
else pstr = "OK";
- snprintf(pstring,slen,"%04x %s",bval,pstr);
rv = 0;
}
break;
default: break;
}
+ if (rv == 0) snprintf(pstring,slen,"%s",pstr);
// if (rv == 0) strncpy(pstring, pstr, slen);
return(rv);
}
diff --git a/util/oem_sun.c b/util/oem_sun.c
index 85b761f..5cedc34 100644
--- a/util/oem_sun.c
+++ b/util/oem_sun.c
@@ -109,7 +109,7 @@ static const struct valstr sunoem_led_mode_optvals[] = {
/* global variables */
static char * progname = "isunoem";
-static char * progver = "3.01";
+static char * progver = "3.02";
static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c
index f3e42dd..d1d1da7 100644
--- a/util/oem_supermicro.c
+++ b/util/oem_supermicro.c
@@ -68,7 +68,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
void set_loglevel(int level); /*prototype */
extern char fsm_debug; /*mem_if.c*/
-static char * progver = "3.01";
+static char * progver = "3.02";
static char * progname = "ismcoem";
static int verbose = 0;
static char fdebug = 0;
@@ -463,32 +463,32 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen)
//if (dbg) printf("supermicro %x sensor reading %x\n",stype,reading);
rv = 0;
switch(bval) {
- case 0x0000: pstr = "00_Low"; break;
- case 0x0001: pstr = "01_Medium"; break;
- case 0x0002: pstr = "02_High"; break;
- case 0x0004: pstr = "04_Overheat"; break;
- case 0x0007: pstr = "07_Not Installed"; break;
+ case 0x0000: pstr = "Low"; break;
+ case 0x0001: pstr = "Medium"; break;
+ case 0x0002: pstr = "High"; break;
+ case 0x0004: pstr = "Overheat"; break;
+ case 0x0007: pstr = "Not Installed"; break;
default: rv = -1; break;
}
break;
case 0x08: /* Power Supply Status (Full/Discrete) Table 42-3 */
rv = 0;
switch(bval) {
- case 0x00: pstr = "00_Absent"; break; /*bit 0*/
- case 0x01: pstr = "01_Present"; break; /*bit 0*/
- case 0x02: pstr = "02_Failure"; break; /*bit 1*/
- case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/
- case 0x08: pstr = "08_Input Lost"; break; /*bit 3*/
+ case 0x00: pstr = "Absent"; break; /*bit 0*/
+ case 0x01: pstr = "Present"; break; /*bit 0*/
+ case 0x02: pstr = "Failure"; break; /*bit 1*/
+ case 0x04: pstr = "Predict Fail"; break; /*bit 2*/
+ case 0x08: pstr = "Input Lost"; break; /*bit 3*/
default: rv = -1; break;
}
break;
case 0x0D: /* HDD Status (Full/Discrete) Table 42-3 */
rv = 0;
switch(bval) {
- case 0x00: pstr = "00_Absent"; break; /*bit 0*/
- case 0x01: pstr = "01_Present"; break; /*bit 0*/
- case 0x02: pstr = "02_Failure"; break; /*bit 1*/
- case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/
+ case 0x00: pstr = "Absent"; break; /*bit 0*/
+ case 0x01: pstr = "Present"; break; /*bit 0*/
+ case 0x02: pstr = "Failure"; break; /*bit 1*/
+ case 0x04: pstr = "Predict Fail"; break; /*bit 2*/
default: rv = -1; break;
}
break;
@@ -520,6 +520,7 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)
dimm = bdata % 10;
#endif
/* ver 0 previous SuperMicro firmware returned all zeros here.
+ * Memory #00 Correctable ECC, <pstr> 6f [00 00 00]
* ver 1 returns data3 with some info (X9)
* ver 2 returns data2 with some info (X9,X10)
* There have been bugs in these SuperMicro events, but this
@@ -548,7 +549,10 @@ int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz)
if (pair < 0) pair = 0;
if (pair > NPAIRS) pair = NPAIRS - 1;
dimm = (bdata & 0x0F) - 9; /*0x0A=dimmX1, 0x0B=dimmX2*/
- n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm);
+ if (dimm < 0)
+ n = sprintf(desc,"unknown DIMM"); /* was ver 0 */
+ else
+ n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm);
}
#ifdef DMIOK
/* Use DMI if we get confirmation about cpu/dimm indices. */
diff --git a/util/subs.c b/util/subs.c
index f2af5da..8965283 100644
--- a/util/subs.c
+++ b/util/subs.c
@@ -403,7 +403,7 @@ int get_errno(void)
/* For a list of all IANA enterprise mfg vendor numbers,
* see http://www.iana.org/assignments/enterprise-numbers
* Product numbers are different for each mfg vendor. */
-#define N_MFG 46
+#define N_MFG 47
static struct { int val; char *pstr; } mfgs[N_MFG] = {
{0, " "},
{0x0000BA, "Toshiba"},
@@ -450,6 +450,7 @@ static struct { int val; char *pstr; } mfgs[N_MFG] = {
{VENDOR_SUN, "Sun"}, /*=0x00002A*/
{VENDOR_LENOVO, "Lenovo"}, /*=0x004A66*/
{VENDOR_LENOVO2, "Lenovo"}, /*=0x004F4D*/
+ {VENDOR_ASUS, "ASUS"}, /*=0x000A3F*/
{VENDOR_INTEL, "Intel"} /*=0x000157*/
};