mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
fix SEL decoding for generic events
This commit is contained in:
parent
897e1c6a20
commit
5c337dcdf6
@ -2,7 +2,7 @@ dnl
|
||||
dnl autoconf for ipmitool
|
||||
dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.5.5])
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.5.6])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
|
@ -1,3 +1,10 @@
|
||||
ipmitool (1.5.5) unstable; urgency=low
|
||||
|
||||
* Add -U option for setting LAN username
|
||||
* Fix -v usage for plugin interfaces
|
||||
|
||||
-- Duncan Laurie <duncan@sun.com> Tue, 25 Nov 2003 15:10:48 -0700
|
||||
|
||||
ipmitool (1.5.4) unstable; urgency=low
|
||||
|
||||
* Put interface plugin API into library
|
||||
|
@ -83,40 +83,19 @@ ipmi_get_event_type(unsigned char code)
|
||||
static const char *
|
||||
ipmi_get_event_desc(struct sel_event_record * rec)
|
||||
{
|
||||
int class;
|
||||
unsigned char offset = 0;
|
||||
unsigned char code = 0;
|
||||
unsigned char code, offset;
|
||||
struct ipmi_event_sensor_types *evt;
|
||||
|
||||
class = ipmi_get_event_class(rec->event_type);
|
||||
if (class < 0)
|
||||
return "Invalid Class";
|
||||
|
||||
switch (class) {
|
||||
case IPMI_EVENT_CLASS_DISCRETE:
|
||||
if (rec->event_type == 0x6f)
|
||||
evt = sensor_specific_types;
|
||||
else
|
||||
evt = generic_event_types;
|
||||
if (rec->event_type == 0x6f) {
|
||||
evt = sensor_specific_types;
|
||||
code = rec->sensor_type;
|
||||
break;
|
||||
case IPMI_EVENT_CLASS_DIGITAL:
|
||||
} else {
|
||||
evt = generic_event_types;
|
||||
code = rec->sensor_type;
|
||||
break;
|
||||
case IPMI_EVENT_CLASS_THRESHOLD:
|
||||
evt = generic_event_types;
|
||||
code = 0x01;
|
||||
break;
|
||||
default:
|
||||
return "Unknown Class";
|
||||
code = rec->event_type;
|
||||
}
|
||||
|
||||
offset = rec->event_data[0] & 0xf;
|
||||
|
||||
if (verbose > 2)
|
||||
printf("offset: 0x%02x\n", offset);
|
||||
|
||||
while (evt->type) {
|
||||
if (evt->code == code && evt->offset == offset)
|
||||
return evt->desc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user