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 autoconf for ipmitool
|
||||||
dnl
|
dnl
|
||||||
AC_INIT([src/ipmitool.c])
|
AC_INIT([src/ipmitool.c])
|
||||||
AM_INIT_AUTOMAKE([ipmitool], [1.5.5])
|
AM_INIT_AUTOMAKE([ipmitool], [1.5.6])
|
||||||
AM_CONFIG_HEADER([config.h])
|
AM_CONFIG_HEADER([config.h])
|
||||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||||
AC_PREREQ(2.50)
|
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
|
ipmitool (1.5.4) unstable; urgency=low
|
||||||
|
|
||||||
* Put interface plugin API into library
|
* Put interface plugin API into library
|
||||||
|
@ -83,40 +83,19 @@ ipmi_get_event_type(unsigned char code)
|
|||||||
static const char *
|
static const char *
|
||||||
ipmi_get_event_desc(struct sel_event_record * rec)
|
ipmi_get_event_desc(struct sel_event_record * rec)
|
||||||
{
|
{
|
||||||
int class;
|
unsigned char code, offset;
|
||||||
unsigned char offset = 0;
|
|
||||||
unsigned char code = 0;
|
|
||||||
struct ipmi_event_sensor_types *evt;
|
struct ipmi_event_sensor_types *evt;
|
||||||
|
|
||||||
class = ipmi_get_event_class(rec->event_type);
|
if (rec->event_type == 0x6f) {
|
||||||
if (class < 0)
|
evt = sensor_specific_types;
|
||||||
return "Invalid Class";
|
|
||||||
|
|
||||||
switch (class) {
|
|
||||||
case IPMI_EVENT_CLASS_DISCRETE:
|
|
||||||
if (rec->event_type == 0x6f)
|
|
||||||
evt = sensor_specific_types;
|
|
||||||
else
|
|
||||||
evt = generic_event_types;
|
|
||||||
code = rec->sensor_type;
|
code = rec->sensor_type;
|
||||||
break;
|
} else {
|
||||||
case IPMI_EVENT_CLASS_DIGITAL:
|
|
||||||
evt = generic_event_types;
|
evt = generic_event_types;
|
||||||
code = rec->sensor_type;
|
code = rec->event_type;
|
||||||
break;
|
|
||||||
case IPMI_EVENT_CLASS_THRESHOLD:
|
|
||||||
evt = generic_event_types;
|
|
||||||
code = 0x01;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return "Unknown Class";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = rec->event_data[0] & 0xf;
|
offset = rec->event_data[0] & 0xf;
|
||||||
|
|
||||||
if (verbose > 2)
|
|
||||||
printf("offset: 0x%02x\n", offset);
|
|
||||||
|
|
||||||
while (evt->type) {
|
while (evt->type) {
|
||||||
if (evt->code == code && evt->offset == offset)
|
if (evt->code == code && evt->offset == offset)
|
||||||
return evt->desc;
|
return evt->desc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user