diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-01-03 02:33:48 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-01-03 02:33:48 +0100 |
commit | 96376f0df63c5df8c1380f0dd58b70d33566d48e (patch) | |
tree | 5c9eb82320f601e2f7637d36e58dd783d38a5914 /util/ievents.c | |
parent | 62a52f983e23e7b63b6bd5db6bd1f08a0259002a (diff) | |
parent | f85b8b834b7ff85c80503faa73f237040330087b (diff) |
Merge tag 'upstream/3.0.1'
Upstream version 3.0.1
Diffstat (limited to 'util/ievents.c')
-rw-r--r-- | util/ievents.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/util/ievents.c b/util/ievents.c index 7ff61e1..1e7f8e2 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.00"; +static char *progver = "3.01"; static char *progname = "ievents"; static char fsensdesc = 0; /* 1= get extended sensor descriptions*/ static char fcanonical = 0; /* 1= show canonical, delimited output*/ @@ -318,8 +318,8 @@ char * batt_str[NBATT] = { /* Battery assert descriptions */ /*01*/ "Failed", /*02*/ "Present" }; char * batt_clr[NBATT] = { /* Battery deassert descriptions */ - /*00*/ "Low OK", - /*01*/ "Failed OK", + /*00*/ "Low is OK now", + /*01*/ "Failed is OK now", /*02*/ "Absent" }; #define N_NMH 6 @@ -731,6 +731,7 @@ extern int decode_sel_kontron(uchar *evt, char *obuf,int sz,char fdesc,char fdbg extern int decode_sel_fujitsu(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_fujitsu.c*/ extern int decode_sel_intel(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_intel.c*/ extern int decode_sel_supermicro(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_supermicro.c*/ +extern int decode_sel_lenovo(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_lenovo.c*/ extern int decode_sel_quanta(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_quanta.c*/ extern int decode_sel_newisys(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_newisys.c*/ extern int decode_sel_dell(uchar *evt, char *obuf,int sz,char fdesc,char fdbg); /*oem_dell.c*/ @@ -1380,6 +1381,10 @@ int decode_sel_oem(int vend, uchar *pevt, char *outbuf,int szbuf, case VENDOR_SUPERMICROX: rv = decode_sel_supermicro(pevt,outbuf,szbuf,fdesc,fdbg); break; + case VENDOR_LENOVO: + case VENDOR_LENOVO2: + rv = decode_sel_lenovo(pevt,outbuf,szbuf,fdesc,fdbg); + break; case VENDOR_QUANTA: rv = decode_sel_quanta(pevt,outbuf,szbuf,fdesc,fdbg); break; @@ -1850,6 +1855,23 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf) else { pstr = "ProcErr Asserted"; sev = SEV_CRIT; } } break; + case 0x08: /*Power Supply*/ + pstr = NULL; /*falls through to unknown*/ + if ((psel->event_trigger == 0x0b) || + (psel->event_trigger == 0x8b)) { + rv = decode_redund(psel->event_trigger, + psel->event_data1, mystr, &sev); + if (rv == 0) pstr = mystr; + } else { + pstr = get_misc_desc( psel->generator_id, + psel->sensor_type, + psel->sensor_number, + psel->event_trigger, + psel->event_data1, + psel->event_data2, + psel->event_data3, &sev); + } + break; case 0x09: /*Power Unit*/ if ((psel->event_trigger == 0x0b) || (psel->event_trigger == 0x8b)) { |