summaryrefslogtreecommitdiff
path: root/util/ievents.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ievents.c')
-rw-r--r--util/ievents.c17
1 files changed, 7 insertions, 10 deletions
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;