Hi All,
The printing of discrete sensor states via ipmi_sdr_print_discrete_state()
and ipmi_sdr_print_discrete_state_mini() is not correct if state1 byte with
state bits 0-7 is set to 0 and state2 byte with state bits 8-14 is not 0.
If you agree with this analysis, the following patch fixes this problem:
diff -Naur ../../ipmitool-1.8.9/lib/ipmi_sdr.c ./ipmi_sdr.c
--- ../../ipmitool-1.8.9/lib/ipmi_sdr.c 2007-03-06
+++ ./ipmi_sdr.c 2008-05-28
@@ -1527,7 +1527,7 @@
struct ipmi_event_sensor_types *evt;
int pre = 0, c = 0;
- if (state1 == 0)
+ if (state1 == 0 && (state2 & 0x7f) == 0)
return;
if (event_type == 0x6f) {
@@ -1543,7 +1543,7 @@
continue;
if (evt->offset > 7) {
- if ((1 << (evt->offset - 8)) & state2) {
+ if ((1 << (evt->offset - 8)) & (state2 & 0x7f)) {
if (pre++ != 0)
printf("%s", separator);
printf("%s", evt->desc);
@@ -1578,7 +1578,7 @@
struct ipmi_event_sensor_types *evt;
int pre = 0, c = 0;
- if (state1 == 0)
+ if (state1 == 0 && (state2 & 0x7f) == 0)
return;
if (event_type == 0x6f) {
@@ -1599,7 +1599,7 @@
}
if (evt->offset > 7) {
- if ((1 << (evt->offset - 8)) & state2) {
+ if ((1 << (evt->offset - 8)) & (state2 & 0x7f)) {
if (evt->desc) {
printf(" "
"[%s]\n",
Thanks,
Bernard MANJOU
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel