mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 11:07:23 +00:00
Bernard Manjou fix for discrete sensor state print routines to address state bits 8-14
This commit is contained in:
parent
c344f2ffe0
commit
34dd10feda
@ -1541,7 +1541,7 @@ ipmi_sdr_print_discrete_state_mini(const char *separator,
|
|||||||
struct ipmi_event_sensor_types *evt;
|
struct ipmi_event_sensor_types *evt;
|
||||||
int pre = 0, c = 0;
|
int pre = 0, c = 0;
|
||||||
|
|
||||||
if (state1 == 0)
|
if (state1 == 0 && (state2 & 0x7f) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event_type == 0x6f) {
|
if (event_type == 0x6f) {
|
||||||
@ -1557,7 +1557,7 @@ ipmi_sdr_print_discrete_state_mini(const char *separator,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (evt->offset > 7) {
|
if (evt->offset > 7) {
|
||||||
if ((1 << (evt->offset - 8)) & state2) {
|
if ((1 << (evt->offset - 8)) & (state2 & 0x7f)) {
|
||||||
if (pre++ != 0)
|
if (pre++ != 0)
|
||||||
printf("%s", separator);
|
printf("%s", separator);
|
||||||
printf("%s", evt->desc);
|
printf("%s", evt->desc);
|
||||||
@ -1592,7 +1592,7 @@ ipmi_sdr_print_discrete_state(const char *desc,
|
|||||||
struct ipmi_event_sensor_types *evt;
|
struct ipmi_event_sensor_types *evt;
|
||||||
int pre = 0, c = 0;
|
int pre = 0, c = 0;
|
||||||
|
|
||||||
if (state1 == 0)
|
if (state1 == 0 && (state2 & 0x7f) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event_type == 0x6f) {
|
if (event_type == 0x6f) {
|
||||||
@ -1613,7 +1613,7 @@ ipmi_sdr_print_discrete_state(const char *desc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (evt->offset > 7) {
|
if (evt->offset > 7) {
|
||||||
if ((1 << (evt->offset - 8)) & state2) {
|
if ((1 << (evt->offset - 8)) & (state2 & 0x7f)) {
|
||||||
if (evt->desc) {
|
if (evt->desc) {
|
||||||
printf(" "
|
printf(" "
|
||||||
"[%s]\n",
|
"[%s]\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user