summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-04-14 18:42:54 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-04-14 18:42:54 +0200
commita8f1f2fbd1fe78c185b5c320c11d0265b49f8668 (patch)
tree869216c945841ed46e2ca4b69af46f54a738d3cd /util
parent42de6cdd540e080b6e34e5e27cb8c44151711010 (diff)
parentc0cffd791bfaffaad631076141fcdfc000adcac1 (diff)
Merge tag 'upstream/3.0.4'
Upstream version 3.0.4
Diffstat (limited to 'util')
-rw-r--r--util/AnsiTerm.cpp9
-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.c17
-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.c2
-rw-r--r--util/ilan.c9
-rw-r--r--util/ipicmg.c2
-rw-r--r--util/ipmiutil.c2
-rw-r--r--util/ireset.c2
-rw-r--r--util/isel.c2
-rw-r--r--util/iseltime.c2
-rw-r--r--util/isensor.c6
-rw-r--r--util/iserial.c2
-rw-r--r--util/isol.c2
-rw-r--r--util/itsol.c2
-rw-r--r--util/iuser.c8
-rw-r--r--util/iwdt.c2
-rw-r--r--util/oem_asus.c4
-rw-r--r--util/oem_dell.c13
-rw-r--r--util/oem_fujitsu.c9
-rw-r--r--util/oem_hp.c10
-rw-r--r--util/oem_intel.c9
-rw-r--r--util/oem_kontron.c9
-rw-r--r--util/oem_lenovo.c37
-rw-r--r--util/oem_newisys.c9
-rw-r--r--util/oem_quanta.c9
-rw-r--r--util/oem_sun.c2
-rw-r--r--util/oem_supermicro.c9
-rw-r--r--util/oem_supermicro.h2
35 files changed, 145 insertions, 62 deletions
diff --git a/util/AnsiTerm.cpp b/util/AnsiTerm.cpp
index 750fd52..956ec98 100644
--- a/util/AnsiTerm.cpp
+++ b/util/AnsiTerm.cpp
@@ -1774,7 +1774,8 @@ CAnsiTerm::ProcessSGR(void)
break;
default:
- assert(false);
+ dbglog("ERROR: bad SGR param %d (0x%02x)\n",index,index);
+ m_Attribute = kDefaultAttribute;
break;
}
}
@@ -1798,6 +1799,7 @@ CAnsiTerm::ProcessSM(void)
{
case 0:
default:
+ dbglog("ERROR: bad private SM param %d\n",m_Parameters[0]);
assert(false);
break;
case DECCKM:
@@ -1846,8 +1848,9 @@ CAnsiTerm::ProcessSM(void)
{
case 20: m_bLineFeedNewLineMode = true; break; // LNM
default:
- dbglog("ProcessSM: param %d != 20\n",m_Parameters[0]);
- assert(false); break;
+ dbglog("ProcessSM: param %d != 20\n",m_Parameters[0]);
+ assert(false);
+ break;
}
}
}
diff --git a/util/ialarms.c b/util/ialarms.c
index 3b73885..7260356 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.03";
+static char * progver = "3.04";
static char * progname = "ialarms";
static char fdebug = 0;
static char fbmctam = 0;
diff --git a/util/icmd.c b/util/icmd.c
index 2f62b00..ec467e7 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.03";
+static char * progver = "3.04";
static char * progname = "icmd";
static char fdebug = 0;
static char fquiet = 0;
diff --git a/util/iconfig.c b/util/iconfig.c
index d29dd8f..f7b9972 100644
--- a/util/iconfig.c
+++ b/util/iconfig.c
@@ -172,7 +172,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.03";
+static char * progver = "3.04";
static char * progname = "iconfig";
static char fdebug = 0;
static char fipmilan = 0;
diff --git a/util/idcmi.c b/util/idcmi.c
index 9382aa7..0cce3c0 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.03";
+static char * progver = "3.04";
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 dc49508..10b665b 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.03";
+static char *progver = "3.04";
static char *progname = "ievents";
static char fsensdesc = 0; /* 1= get extended sensor descriptions*/
static char fcanonical = 0; /* 1= show canonical, delimited output*/
@@ -1595,20 +1595,21 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf)
char fhave_sdr = 0;
char mdesc[80]; /*used for oem memory description*/
int msz;
+ char *mfgstr;
+ int mfg;
if (outbuf == NULL) return(ERR_BAD_PARAM);
if (pevt == NULL) {
outbuf[0] = 0;
return(ERR_BAD_PARAM);
}
- get_mfgid(&vend,&prod); /*saved from ipmi_getdeviceid */
+ get_mfgid(&vend,&prod); /*saved from ipmi_getdeviceid */
psel = (SEL_RECORD *)pevt;
j = decode_sel_oem(vend,pevt,outbuf,szbuf,fsensdesc,fdebug);
if (j == 0) return(0); /*successful, have the description*/
if (psel->record_type == RT_OEMIU) { /* 0xDB usu ipmiutil OEM string */
- int ix = 0;
/* ipmiutil OEM event with 9-byte string */
pc = (uchar *)&psel->generator_id; /* offset 7 */
evtime = (uchar *)&psel->timestamp;
@@ -1616,9 +1617,9 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf)
(evtime[2] << 16) + (evtime[3] << 24);
fmt_time(eventTime, timebuf, sizeof(timebuf));
if (fcanonical)
- sprintf(outbuf,"%04x %c %s %c %s %c %02x %c %06x %c %s %c OEM Event ",
- psel->record_id, bdelim, timebuf, bdelim,
- get_sev_str(sev), bdelim, psel->record_type, bdelim);
+ sprintf(outbuf,"%04x %c %s %c %s %c %02x %c OEM Event ",
+ psel->record_id, bdelim, timebuf, bdelim,
+ get_sev_str(sev), bdelim, psel->record_type, bdelim);
else
sprintf(outbuf,"%04x %s %s %02x OEM Event ",
psel->record_id, timebuf, get_sev_str(sev),
@@ -1633,8 +1634,6 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf)
outbuf[j++] = 0;
} else if (psel->record_type == 0xDC) {
/* OEM Record: these are usually Microsoft */
- char *mfgstr;
- int mfg;
evtime = (uchar *)&psel->timestamp;
eventTime = evtime[0] + (evtime[1] << 8) +
(evtime[2] << 16) + (evtime[3] << 24);
@@ -1659,8 +1658,6 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf)
outbuf[j++] = '\n';
outbuf[j++] = 0;
} else if (psel->record_type == 0xDD) { /* usu Intel OEM string */
- char *mfgstr;
- int mfg;
int ix = 0;
/* Windows reboot reason string from MS ipmidrv.sys */
evtime = (uchar *)&psel->timestamp;
diff --git a/util/ifirewall.c b/util/ifirewall.c
index e3e7626..719d2b8 100644
--- a/util/ifirewall.c
+++ b/util/ifirewall.c
@@ -64,7 +64,7 @@
/* global variables */
static char * progname = "ifirewall";
-static char * progver = "3.03";
+static char * progver = "3.04";
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 6c3573c..c91fab2 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.03";
+static char *progver = "3.04";
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 b62d885..d24b089 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.03";
+static char *progver = "3.04";
static char fdebug = 0;
static char fpicmg = 0;
static char fonlybase = 0;
diff --git a/util/igetevent.c b/util/igetevent.c
index 9f8a2c0..40c5e4a 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.03";
+static char * progver = "3.04";
static char fdebug = 0;
static char fipmilan = 0;
static char frunonce = 0;
diff --git a/util/ihealth.c b/util/ihealth.c
index be5c57a..974fa95 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.03";
+static char * progver = "3.04";
static char fdebug = 0;
static char fipmilan = 0;
static char fcanonical = 0;
diff --git a/util/ilan.c b/util/ilan.c
index 6451ba8..6f63fe5 100644
--- a/util/ilan.c
+++ b/util/ilan.c
@@ -305,8 +305,8 @@ extern char *get_sensor_type_desc (uchar stype); /*from ievents.c */
/*
* Global variables
*/
-static char *progver = "3.03";
-static char *progname = "ilan";
+static char * progname = "ilan";
+static char * progver = "3.04";
static char fdebug = 0;
static char fipmilan = 0;
static char fIPMI10 = 0; /* =1 if IPMI v1.0 or less */
@@ -4058,15 +4058,14 @@ PefDesc (int idx, uchar stype)
#ifdef METACOMMAND
-int
-i_lan (int argc, char **argv)
+int i_lan(int argc, char **argv)
#else
#ifdef WIN32
int __cdecl
#else
int
#endif
-main (int argc, char **argv)
+main(int argc, char **argv)
#endif
{
int ret;
diff --git a/util/ipicmg.c b/util/ipicmg.c
index 8019a3f..e463424 100644
--- a/util/ipicmg.c
+++ b/util/ipicmg.c
@@ -81,7 +81,7 @@
/* Global data */
static char * progname = "ipicmg";
-static char * progver = "3.03";
+static char * progver = "3.04";
static char fdebug = 0;
static char fset_mc = 0;
static uint8_t g_bus = PUBLIC_BUS;
diff --git a/util/ipmiutil.c b/util/ipmiutil.c
index 26b156a..ffddc86 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.03";
+static char *progver = "3.04";
// static char fdebug = 0;
/*int ipmiutil(int argc, char **argv); */
diff --git a/util/ireset.c b/util/ireset.c
index 45133fe..3584cb1 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.03";
+static char * progver = "3.04";
static char * progname = "ireset";
static uchar ipmi_maj;
static uchar ipmi_min;
diff --git a/util/isel.c b/util/isel.c
index a1d4fdb..9045d62 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.03";
+static char *progver = "3.04";
#ifdef WIN32
#define IDXFILE "sel.idx"
static char idxfile[80] = IDXFILE;
diff --git a/util/iseltime.c b/util/iseltime.c
index 3aa9f27..2f5c7e1 100644
--- a/util/iseltime.c
+++ b/util/iseltime.c
@@ -78,7 +78,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/*
* Global variables
*/
-static char * progver = "3.03";
+static char * progver = "3.04";
static char * progname = "iseltime";
static char fdebug = 0;
static char fset = 0;
diff --git a/util/isensor.c b/util/isensor.c
index 3de3d38..69d901f 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); /*see oem_supermicro.c*/
+ int slen, int fsimple); /*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.03";
+static char *progver = "3.04";
#ifdef WIN32
static char savefile[] = "%ipmiutildir%\\thresholds.cmd";
#else
@@ -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);
+ rv = decode_sensor_supermicro(sdr, reading, pstring, slen, fsimple);
break;
case VENDOR_QUANTA:
rv = decode_sensor_quanta(sdr, reading, pstring, slen);
diff --git a/util/iserial.c b/util/iserial.c
index 8bed75c..a087614 100644
--- a/util/iserial.c
+++ b/util/iserial.c
@@ -155,7 +155,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.03";
+static char * progver = "3.04";
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 8bd5a2f..fab0994 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.03";
+static char * progver = "3.04";
static char * progname = "isol";
static char fdebug = 0;
static char fpicmg = 0;
diff --git a/util/itsol.c b/util/itsol.c
index 8d5ba1b..6997ffe 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.03";
+static char * progver = "3.04";
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
static uchar g_lun = BMC_LUN;
diff --git a/util/iuser.c b/util/iuser.c
index 7cbe661..e6a7b29 100644
--- a/util/iuser.c
+++ b/util/iuser.c
@@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* global variables */
static char * progname = "iuser";
-static char * progver = "3.03";
+static char * progver = "3.04";
static char fdebug = 0;
static char fcanonical = 0;
static char bdelim = '|';
@@ -69,10 +69,12 @@ extern int verbose; /*see ipmilanplus.c*/
extern void lprintf(int level, const char * format, ...); /*ipmilanplus.c*/
-int GetUserInfo(uchar unum, uchar chan, uchar *enab, uchar *priv, char *uname, char fdebug);
+/* from ilan.c */
+char *parse_priv(uchar c);
+int DisableUser (int unum, uchar chan);
int SetPasswd(int unum, char *uname, char *upswd, uchar chan, uchar priv);
int GetBmcEthDevice(uchar lan_parm, uchar *pchan);
-char *parse_priv(uchar c);
+int GetUserInfo(uchar unum, uchar chan, uchar *enab, uchar *priv, char *uname, char fdebug);
static void printf_user_usage(void)
{
diff --git a/util/iwdt.c b/util/iwdt.c
index 820d57b..13253b3 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.03";
+static char * progver = "3.04";
static char * progname = "iwdt";
static char fdebug = 0;
static char fdontlog = 0;
diff --git a/util/oem_asus.c b/util/oem_asus.c
index 24226b9..cd5c01e 100644
--- a/util/oem_asus.c
+++ b/util/oem_asus.c
@@ -60,8 +60,8 @@ 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 char * progname = "iasusoem";
+static char * progver = "3.04";
static int verbose = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
diff --git a/util/oem_dell.c b/util/oem_dell.c
index f8caf9a..4f9a7ab 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.03";
+static char * progver = "3.04";
static char * progname = "idelloem";
static int verbose = 0;
static char fdebug = 0;
@@ -4476,10 +4476,9 @@ static int ipmi_print_power_cap(void* intf,uint8_t unit )
tempbtuphrconv=watt_to_btuphr_conversion(ipmipowercap.PowerCap);
printf ("Power cap : %ld BTU/hr\n",tempbtuphrconv);
}else{
-
- printf ("Maximum power: %ld Watt\n",ipmipowercap.MaximumPowerConsmp);
- printf ("Minimum power: %ld Watt\n",ipmipowercap.MinimumPowerConsmp);
- printf ("Power cap : %ld Watt\n",ipmipowercap.PowerCap);
+ printf ("Maximum power: %d Watt\n",ipmipowercap.MaximumPowerConsmp);
+ printf ("Minimum power: %d Watt\n",ipmipowercap.MinimumPowerConsmp);
+ printf ("Power cap : %d Watt\n",ipmipowercap.PowerCap);
}
}
return rc;
@@ -5676,8 +5675,8 @@ char * get_dell_evt_desc(uchar *sel_rec, int *psev)
{
if(0x51 == version)
{
- snprintf(tmpdesc, SIZE_OF_DESC, "DIMM %s", ('A'+ data3));
- strcat(desc, tmpdesc);
+ snprintf(tmpdesc, SIZE_OF_DESC, "DIMM %c", (char)('A'+ data3));
+ strcat(desc, tmpdesc);
}
else if( ((data2 >> 4) > 0x07) && ((data2 >> 4) != 0x0F))
{
diff --git a/util/oem_fujitsu.c b/util/oem_fujitsu.c
index 362df96..9a4783a 100644
--- a/util/oem_fujitsu.c
+++ b/util/oem_fujitsu.c
@@ -52,6 +52,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* extern void get_mfgid(int *vend, int *prod); * from ipmicmd.h*/
/* extern int get_lan_options(); * from ipmicmd.h */
+static char * progver = "3.04";
+static char * progname = "ifujitsuoem";
static char fdebug = 0;
static char freadok = 1;
#define ERRLED 0 /*GEL - red Global Error LED*/
@@ -770,4 +772,11 @@ int decode_sensor_fujitsu(uchar *sdr,uchar *reading,char *pstring, int slen)
return(rv);
}
+#ifdef METACOMMAND
+int i_fujitsuoem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_fujitsu.c */
diff --git a/util/oem_hp.c b/util/oem_hp.c
index b7f7d07..081ea6f 100644
--- a/util/oem_hp.c
+++ b/util/oem_hp.c
@@ -44,6 +44,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ievents.h"
#include "isensor.h"
+static char * progver = "3.04";
+static char * progname = "ihpoem";
+
static char *redund_str(uchar b)
{
char *pstr;
@@ -153,4 +156,11 @@ void show_oemsdr_hp(uchar *sdr)
return;
}
+#ifdef METACOMMAND
+int i_hpoem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_hp.c */
diff --git a/util/oem_intel.c b/util/oem_intel.c
index 6f61010..bf21ec5 100644
--- a/util/oem_intel.c
+++ b/util/oem_intel.c
@@ -83,6 +83,8 @@ extern char fdebug; /*ipmicmd.c*/
/*
* Global variables
*/
+static char * progver = "3.04";
+static char * progname = "iinteloem";
static char fRelayBits = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
@@ -1893,4 +1895,11 @@ void show_enc_leds_intel(uchar val, int numd)
else show_enc_leds_i2c(val, numd);
}
+#ifdef METACOMMAND
+int i_inteloem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_intel.c */
diff --git a/util/oem_kontron.c b/util/oem_kontron.c
index 891075a..b8fedf7 100644
--- a/util/oem_kontron.c
+++ b/util/oem_kontron.c
@@ -73,6 +73,8 @@ typedef uint32_t socklen_t;
#define FRU_TYPE_COMPONENT 0x01
#define FRU_TYPE_BASEBOARD 0x07
+static char * progver = "3.04";
+static char * progname = "ikontronoem";
const struct valstr ktc5520_post[] = { /*from EAS*/
{ 0x0003, "Start POST Init" },
{ 0x0004, "Check CMOS" },
@@ -1103,4 +1105,11 @@ int decode_sensor_kontron(uchar *sdr,uchar *reading,char *pstring, int slen)
return(rv);
}
+#ifdef METACOMMAND
+int i_kontronoem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_kontron.c */
diff --git a/util/oem_lenovo.c b/util/oem_lenovo.c
index a1162bb..dc15a5d 100644
--- a/util/oem_lenovo.c
+++ b/util/oem_lenovo.c
@@ -61,8 +61,8 @@ 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 = "ioemlenovo";
+static char * progver = "3.04";
+static char * progname = "ilenovooem";
static int verbose = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
@@ -92,6 +92,7 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
ushort rval;
char *pstr = NULL;
int b;
+ int vend, prod;
if (sdr == NULL || reading == NULL) return(rv);
if (pstring == NULL || slen == 0) return(rv);
@@ -103,11 +104,12 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
etype = sdr[13];
rval = reading[2] | ((reading[3] & 0x7f) << 8);
b = bitnum(rval);
- if (fdebug) printf("oem_lenovo: sensor type=%x evt=%x entity=%x rval=%04x\n",
- stype,etype,entity,rval);
+ get_mfgid(&vend,&prod); /*saved from ipmi_getdeviceid */
+ if (fdebug) printf("oem_lenovo: mfg=%04x:%04x sensor type=%x evt=%x entity=%x rval=%04x\n",
+ vend,prod,stype,etype,entity,rval);
switch(stype) {
- case 0x07: /* All CPUs */
- if (etype == 0x6F) {
+ case 0x07: /* CPU sensor type */
+ if ((etype == 0x6F) && (entity == 25)) { /*All CPUs*/
switch(b) {
case 0x00: pstr = "OK"; break;
case 0x02: pstr = "BIST_Fail"; break;
@@ -118,6 +120,28 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
}
rv = 0;
}
+ else if ((etype == 0x6F) && (entity == 3)) { /*CPU status*/
+ /* Special CPU status reported on IBM/Lenovo */
+ switch(rval) {
+ case 0x00: pstr = "Absent"; break;
+ case 0x80: pstr = "Present"; break;
+ default: pstr = "Error"; break;
+ }
+ rv = 0;
+ }
+ break;
+ case 0x0C: /* DIMM slot status */
+ /* Special DIMM status reported on IBM/Lenovo */
+ /* IBM x3650 M2 (0x0002, 0x00dc) and
+ * Lenovo x3650 M4 (0x4f4d, 0x0143) */
+ if (etype == 0x6F) {
+ switch(rval) {
+ case 0x00: pstr = "Absent"; break;
+ case 0x40: pstr = "Present"; break;
+ default: pstr = "Error"; break;
+ }
+ rv = 0;
+ }
break;
case 0x0D: /* Disk Drive slots */
if (etype == 0x6F) {
@@ -204,6 +228,7 @@ int decode_sensor_lenovo(uchar *sdr,uchar *reading,char *pstring, int slen)
rv = 0;
}
break;
+
default: break;
}
if (rv == 0) snprintf(pstring,slen,"%s",pstr);
diff --git a/util/oem_newisys.c b/util/oem_newisys.c
index dd4d759..6b21e1b 100644
--- a/util/oem_newisys.c
+++ b/util/oem_newisys.c
@@ -43,6 +43,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ipmicmd.h"
#include "ievents.h"
+static char * progver = "3.04";
+static char * progname = "inewisysoem";
static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
static uchar g_sa = BMC_SA;
@@ -126,4 +128,11 @@ int decode_sel_newisys(uchar *evt, char *outbuf, int outsz, char fdesc,
return rv;
}
+#ifdef METACOMMAND
+int i_newisysoem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_newisys.c */
diff --git a/util/oem_quanta.c b/util/oem_quanta.c
index a0ee3bb..a6cfd6a 100644
--- a/util/oem_quanta.c
+++ b/util/oem_quanta.c
@@ -45,6 +45,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern int decode_sensor_intel_nm(uchar *sdr,uchar *reading,
char *pstring,int slen); /*oem_intel.c*/
+static char * progver = "3.04";
+static char * progname = "iquantaoem";
static char fdbg = 0;
/*
@@ -139,4 +141,11 @@ int decode_sel_quanta(uchar *evt, char *outbuf, int outsz, char fdesc,
return(rv);
}
+#ifdef METACOMMAND
+int i_quantaoem(int argc, char **argv)
+{
+ printf("%s ver %s\n", progname,progver);
+ return(0);
+}
+#endif
/* end oem_quanta.c */
diff --git a/util/oem_sun.c b/util/oem_sun.c
index 1d25301..8aa211b 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.03";
+static char * progver = "3.04";
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 165bf88..a480b7f 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.03";
+static char * progver = "3.04";
static char * progname = "ismcoem";
static int verbose = 0;
static char fdebug = 0;
@@ -414,7 +414,8 @@ int decode_threshold_supermicro(uchar rval, uchar *thresh)
* non-zero otherwise, to use default interpretations.
* pstring = contains the sensor reading interpretation string (if rv==0)
*/
-int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen)
+int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen,
+ int fsimple)
{
int i, rv = -1;
uchar stype, etype, snum;
@@ -455,7 +456,9 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen)
sdr01 = (SDR01REC *)sdr;
val = RawToFloat(reading[0],sdr);
typestr = get_unit_type(sdr01->sens_units,sdr01->sens_base,sdr01->sens_mod, 0);
- snprintf(pstring, slen, "%s %.2f %s",pstr,val,typestr);
+ if (fsimple)
+ snprintf(pstring, slen, "%s | %.2f %s",pstr,val,typestr);
+ else snprintf(pstring, slen, "%s %.2f %s",pstr,val,typestr);
return(rv);
}
switch(stype) {
diff --git a/util/oem_supermicro.h b/util/oem_supermicro.h
index daf08d6..c8f9147 100644
--- a/util/oem_supermicro.h
+++ b/util/oem_supermicro.h
@@ -48,7 +48,7 @@ int oem_supermicro_get_lan_port(uchar *val);
int oem_supermicro_set_lan_port(uchar val);
char *oem_supermicro_lan_port_string(uchar val);
-int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen);
+int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen, int fsimple);
int decode_mem_supermicro(int prod, uchar b2, uchar b3, char *desc, int *psz);
int decode_sel_supermicro(uchar *evt, char *outbuf, int outsz, char fdesc,
char fdebug);