summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-13 17:06:48 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-13 17:06:48 +0200
commit4708957cb7c4a2d09e98b513d1bad3d637306f4e (patch)
tree1a105a8765e1a1ef16f154fb787087dc2987240a /util
parent401b3073c7af7fe89dd70955ef4431da91cc3f29 (diff)
parentdcc89cc2006fea0ca21fbe267930a0ac3c850b52 (diff)
Updated version 3.0.6 from 'upstream/3.0.6'
with Debian dir 5538bf70e263e154d55e3077e841548417b46966
Diffstat (limited to 'util')
-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.c2
-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.c3
-rw-r--r--util/ilan.c2
-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.c25
-rw-r--r--util/isensor.h4
-rw-r--r--util/iserial.c2
-rw-r--r--util/isol.c2
-rw-r--r--util/itsol.c2
-rw-r--r--util/iuser.c2
-rw-r--r--util/iwdt.c2
-rw-r--r--util/oem_asus.c2
-rw-r--r--util/oem_dell.c2
-rw-r--r--util/oem_fujitsu.c2
-rw-r--r--util/oem_hp.c2
-rw-r--r--util/oem_intel.c2
-rw-r--r--util/oem_kontron.c2
-rw-r--r--util/oem_lenovo.c2
-rw-r--r--util/oem_newisys.c2
-rw-r--r--util/oem_quanta.c2
-rw-r--r--util/oem_sun.c2
-rw-r--r--util/oem_supermicro.c41
34 files changed, 80 insertions, 53 deletions
diff --git a/util/ialarms.c b/util/ialarms.c
index 7c1ae56..782667f 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.05";
+static char * progver = "3.06";
static char * progname = "ialarms";
static char fdebug = 0;
static char fbmctam = 0;
diff --git a/util/icmd.c b/util/icmd.c
index 90d63a7..d90bb02 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.05";
+static char * progver = "3.06";
static char * progname = "icmd";
static char fdebug = 0;
static char fquiet = 0;
diff --git a/util/iconfig.c b/util/iconfig.c
index bd5d74b..195d6cb 100644
--- a/util/iconfig.c
+++ b/util/iconfig.c
@@ -172,7 +172,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "iconfig";
static char fdebug = 0;
static char fipmilan = 0;
diff --git a/util/idcmi.c b/util/idcmi.c
index e521606..63c5268 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.05";
+static char * progver = "3.06";
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 83ddcd8..67e6b70 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.05";
+static char *progver = "3.06";
static char *progname = "ievents";
static char fsensdesc = 0; /* 1= get extended sensor descriptions*/
static char fcanonical = 0; /* 1= show canonical, delimited output*/
diff --git a/util/ifirewall.c b/util/ifirewall.c
index 66454c9..cdf8531 100644
--- a/util/ifirewall.c
+++ b/util/ifirewall.c
@@ -64,7 +64,7 @@
/* global variables */
static char * progname = "ifirewall";
-static char * progver = "3.05";
+static char * progver = "3.06";
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 2a0e496..08389be 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.05";
+static char *progver = "3.06";
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 47cb077..8f94345 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.05";
+static char *progver = "3.06";
static char fdebug = 0;
static char fpicmg = 0;
static char fonlybase = 0;
diff --git a/util/igetevent.c b/util/igetevent.c
index 110de4d..bbcbd40 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.05";
+static char * progver = "3.06";
static char fdebug = 0;
static char fipmilan = 0;
static char frunonce = 0;
diff --git a/util/ihealth.c b/util/ihealth.c
index 0ba6a79..fcef947 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.05";
+static char * progver = "3.06";
static char fdebug = 0;
static char fipmilan = 0;
static char fcanonical = 0;
@@ -771,6 +771,7 @@ void show_devid_all(int dtype, uchar *devrec, int sdevrec)
do_powerstate = 0; break;
case 2137: prodstr = "(X10DRH)"; break; /*0x0859*/
case 2203: prodstr = "(X11SSW-F)"; break; /*0x089b*/
+ case 2327: prodstr = "(X11DPi)"; break; /*0x0917*/
case 4520: prodstr = "(H8DGU)"; break;
case 43025: prodstr = "(H8DGU-F)"; break;
case 43707: prodstr = "(X8DTH)"; break;
diff --git a/util/ilan.c b/util/ilan.c
index b73dec4..1638381 100644
--- a/util/ilan.c
+++ b/util/ilan.c
@@ -306,7 +306,7 @@ extern char *get_sensor_type_desc (uchar stype); /*from ievents.c */
* Global variables
*/
static char * progname = "ilan";
-static char * progver = "3.05";
+static char * progver = "3.06";
static char fdebug = 0;
static char fipmilan = 0;
static char fIPMI10 = 0; /* =1 if IPMI v1.0 or less */
diff --git a/util/ipicmg.c b/util/ipicmg.c
index 42cc33c..46cdac7 100644
--- a/util/ipicmg.c
+++ b/util/ipicmg.c
@@ -81,7 +81,7 @@
/* Global data */
static char * progname = "ipicmg";
-static char * progver = "3.05";
+static char * progver = "3.06";
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 53e1e64..b924449 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.05";
+static char *progver = "3.06";
// static char fdebug = 0;
/*int ipmiutil(int argc, char **argv); */
diff --git a/util/ireset.c b/util/ireset.c
index cf71404..e2c1930 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.05";
+static char * progver = "3.06";
static char * progname = "ireset";
static uchar ipmi_maj;
static uchar ipmi_min;
diff --git a/util/isel.c b/util/isel.c
index 64cf946..8b35d11 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.05";
+static char *progver = "3.06";
#ifdef WIN32
#define IDXFILE "sel.idx"
static char idxfile[80] = IDXFILE;
diff --git a/util/iseltime.c b/util/iseltime.c
index 1b16008..eb3ce8b 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.05";
+static char * progver = "3.06";
static char * progname = "iseltime";
static char fdebug = 0;
static char fset = 0;
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);
diff --git a/util/isensor.h b/util/isensor.h
index 8927b6e..f578274 100644
--- a/util/isensor.h
+++ b/util/isensor.h
@@ -16,8 +16,8 @@ typedef struct {
uchar entity_inst;
uchar sens_init;
uchar sens_capab;
- uchar sens_type;
- uchar ev_type;
+ uchar sens_type; /*sdr[12]*/
+ uchar ev_type; /*sdr[13]*/
uchar data1[6]; /*masks*/
uchar sens_units; /*sdr[20]*/
uchar sens_base;
diff --git a/util/iserial.c b/util/iserial.c
index e183e5c..42ada0a 100644
--- a/util/iserial.c
+++ b/util/iserial.c
@@ -155,7 +155,7 @@ typedef struct
/*
* Global variables
*/
-static char * progver = "3.05";
+static char * progver = "3.06";
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 f99b094..1fd3eb0 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.05";
+static char * progver = "3.06";
static char * progname = "isol";
static char fdebug = 0;
static char fpicmg = 0;
diff --git a/util/itsol.c b/util/itsol.c
index b3f0940..fe6a78d 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.05";
+static char * progver = "3.06";
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 43ebf6e..0bf29b7 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.05";
+static char * progver = "3.06";
static char fdebug = 0;
static char fcanonical = 0;
static char bdelim = '|';
diff --git a/util/iwdt.c b/util/iwdt.c
index 3ebe39b..898fbf3 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.05";
+static char * progver = "3.06";
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 1abd020..38cf89d 100644
--- a/util/oem_asus.c
+++ b/util/oem_asus.c
@@ -61,7 +61,7 @@ extern char fdebug; /*ipmicmd.c*/
void set_loglevel(int level); /*prototype */
static char * progname = "iasusoem";
-static char * progver = "3.05";
+static char * progver = "3.06";
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 836c9ab..b226a95 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.05";
+static char * progver = "3.06";
static char * progname = "idelloem";
static int verbose = 0;
static char fdebug = 0;
diff --git a/util/oem_fujitsu.c b/util/oem_fujitsu.c
index e5c914e..13f6ee6 100644
--- a/util/oem_fujitsu.c
+++ b/util/oem_fujitsu.c
@@ -52,7 +52,7 @@ 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.05";
+static char * progver = "3.06";
static char * progname = "ifujitsuoem";
static char fdebug = 0;
static char freadok = 1;
diff --git a/util/oem_hp.c b/util/oem_hp.c
index 83dfaca..afb0762 100644
--- a/util/oem_hp.c
+++ b/util/oem_hp.c
@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ievents.h"
#include "isensor.h"
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "ihpoem";
static char *redund_str(uchar b)
diff --git a/util/oem_intel.c b/util/oem_intel.c
index 997d604..1575983 100644
--- a/util/oem_intel.c
+++ b/util/oem_intel.c
@@ -83,7 +83,7 @@ extern char fdebug; /*ipmicmd.c*/
/*
* Global variables
*/
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "iinteloem";
static char fRelayBits = 0;
static uchar g_bus = PUBLIC_BUS;
diff --git a/util/oem_kontron.c b/util/oem_kontron.c
index ec0546f..23ece0e 100644
--- a/util/oem_kontron.c
+++ b/util/oem_kontron.c
@@ -73,7 +73,7 @@ typedef uint32_t socklen_t;
#define FRU_TYPE_COMPONENT 0x01
#define FRU_TYPE_BASEBOARD 0x07
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "ikontronoem";
const struct valstr ktc5520_post[] = { /*from EAS*/
{ 0x0003, "Start POST Init" },
diff --git a/util/oem_lenovo.c b/util/oem_lenovo.c
index 0f4af57..2ce67d6 100644
--- a/util/oem_lenovo.c
+++ b/util/oem_lenovo.c
@@ -61,7 +61,7 @@ extern uchar bitnum(ushort value); /*isensor.c*/
extern char fdebug; /*ipmicmd.c*/
void set_loglevel(int level); /*prototype */
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "ilenovooem";
static int verbose = 0;
static uchar g_bus = PUBLIC_BUS;
diff --git a/util/oem_newisys.c b/util/oem_newisys.c
index ada0f73..f44b82d 100644
--- a/util/oem_newisys.c
+++ b/util/oem_newisys.c
@@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ipmicmd.h"
#include "ievents.h"
-static char * progver = "3.05";
+static char * progver = "3.06";
static char * progname = "inewisysoem";
static char fdebug = 0;
static uchar g_bus = PUBLIC_BUS;
diff --git a/util/oem_quanta.c b/util/oem_quanta.c
index efaeb5f..c808c2a 100644
--- a/util/oem_quanta.c
+++ b/util/oem_quanta.c
@@ -45,7 +45,7 @@ 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.05";
+static char * progver = "3.06";
static char * progname = "iquantaoem";
static char fdbg = 0;
diff --git a/util/oem_sun.c b/util/oem_sun.c
index c45f6ee..e225a77 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.05";
+static char * progver = "3.06";
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 d733213..94024b2 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.05";
+static char * progver = "3.06";
static char * progname = "ismcoem";
static int verbose = 0;
static char fdebug = 0;
@@ -433,6 +433,7 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen,
snum = sdr[7]; /*sdr01->sens_num*/
stype = sdr[12]; /*sensor_type*/
etype = sdr[13]; /*sdr01->ev_type*/
+ get_mfgid(&vend_id,&prod_id); /*saved from ipmi_getdeviceid */
/* sdr[3] rec_type is 0x01 for Full, 0x02 for Compact */
if ((sdr[3] == 0x01) && (etype == 0x01)) { /* full threshold sensor */
/*if Temp sensor, bits==0 would show BelowCrit, so handle normally */
@@ -497,6 +498,14 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen,
default: rv = -1; break;
}
break;
+ case 0x29: /* VBAT sensor */
+ if (prod_id == 0x0917) { /*X11DRi has inert VBAT full sensor*/
+ if (bval == 0) {
+ pstr = "NotAvailable";
+ rv = 0;
+ }
+ }
+ break;
default:
break;
}
@@ -661,9 +670,9 @@ int decode_sel_supermicro(uchar *evt, char *outbuf, int outsz, char fdesc,
sevid = SEV_MAJ;
rv = 0;
break;
- case 0xC8: /* Observed Event: Temp/Cooling issue, reboots */
+ case 0xC8: /* Observed Event: AC Power on event */
/* usually OEM(c8) #ff - 6f [a0 ff ff] */
- pstr = "OEMC8: Temp/Cooling fault";
+ pstr = "OEMC8: AC Power On";
sevid = SEV_MAJ;
rv = 0;
break;
@@ -686,7 +695,7 @@ static int factory_defaults(int mode)
uchar idata[16];
uchar cc;
/*
- From SMC IPMICFG -fde session:
+ From SMC IPMICFG -fde factory defaults session:
start_kcs_transaction - 18 01 (get_device_id)
start_kcs_transaction - 18 25 (watchdog get)
start_kcs_transaction - b0 00 00 (unknown, invalid)
@@ -695,6 +704,12 @@ static int factory_defaults(int mode)
start_kcs_transaction - 18 01 (get_device_id)
start_kcs_transaction - c0 41 (reset_factory_defaults, -fde)
*/
+ if ((prod_id > 2200) && (prod_id < 2300) && (mode == 0)) {
+ /* use netfn 3c, cmd 40 for X11? */
+ /* similar to ipmitool raw 0x3c 0x40 */
+ if (fdebug) printf("may also need ipmiutil cmd 00 20 f0 40\n");
+ // mode = 3;
+ }
/* b0 00 00: cmd=00 netfn=2C */
rlen = sizeof(rdata);
@@ -705,7 +720,7 @@ static int factory_defaults(int mode)
if (fdebug) printf("b0 00 returned %d\n",rv);
/* if (rv != 0) return(rv); */
- if (mode == 2) {
+ if (mode == 2) { /* (get_system_guid) */
rlen = sizeof(rdata);
rv = ipmi_cmdraw(0x37, (0x18 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN,
idata, 0, rdata, &rlen, &cc, fdebug);
@@ -714,10 +729,15 @@ static int factory_defaults(int mode)
if (rv != 0) return(rv);
}
- /* reset factory defaults cmd=0x41 netfn=0x30 (netfn/lun=0xC0) */
+ /* reset factory defaults */
rlen = sizeof(rdata);
- rv = ipmi_cmdraw(0x41, (0xc0 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN,
- idata, 0, rdata, &rlen, &cc, fdebug);
+ if (mode == 3) { /* cmd=0x40 netfn=0x3c (netfn/lun=0xF0) */
+ rv = ipmi_cmdraw(0x40, 0x3c, BMC_SA, PUBLIC_BUS, BMC_LUN,
+ idata, 0, rdata, &rlen, &cc, fdebug);
+ } else { /* cmd=0x41 netfn=0x30 (netfn/lun=0xC0) if X10 or less */
+ rv = ipmi_cmdraw(0x41, (0xc0 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN,
+ idata, 0, rdata, &rlen, &cc, fdebug);
+ }
if ((rv == 0) && (cc != 0)) rv = cc;
if (fdebug) printf("factory default reset returned %d\n",rv);
if (rv != 0) return(rv);
@@ -743,6 +763,11 @@ static int ipmi_smcoem_main(int argc, char **argv)
char msg[80];
uchar val;
+ if ((vend_id != VENDOR_SUPERMICRO) && (vend_id != VENDOR_SUPERMICROX)) {
+ printf("Not SuperMicro firmware, ignoring smcoem\n");
+ usage();
+ return(ERR_USAGE);
+ }
if (strncmp(argv[0],"intrusion",9) == 0) {
printf("Clearing Chassis Intrusion ...\n");
rv = oem_supermicro_reset_intrusion();