diff options
Diffstat (limited to 'util/ievents.c')
-rw-r--r-- | util/ievents.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/util/ievents.c b/util/ievents.c index 6a34e16..7ff61e1 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 = "2.99"; +static char *progver = "3.00"; static char *progname = "ievents"; static char fsensdesc = 0; /* 1= get extended sensor descriptions*/ static char fcanonical = 0; /* 1= show canonical, delimited output*/ @@ -1601,7 +1601,31 @@ int decode_sel_entry( uchar *pevt, char *outbuf, int szbuf) j = decode_sel_oem(vend,pevt,outbuf,szbuf,fsensdesc,fdebug); if (j == 0) return(0); /*successful, have the description*/ - if (psel->record_type == 0xDC) { + 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; + eventTime = evtime[0] + (evtime[1] << 8) + + (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); + else + sprintf(outbuf,"%04x %s %s %02x OEM Event ", + psel->record_id, timebuf, get_sev_str(sev), + psel->record_type); + j = strlen_(outbuf); + for (i = 0; i < 9; i++) { /* 7:16 = 9 bytes string data */ + if (pc[i] == 0) outbuf[j] = ' '; + else sprintf(&outbuf[j],"%c",pc[i]); + j += 1; + } + outbuf[j++] = '\n'; + outbuf[j++] = 0; + } else if (psel->record_type == 0xDC) { /* OEM Record: these are usually Microsoft */ char *mfgstr; int mfg; |