mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-14 12:37:22 +00:00
ID: 244 - "0.0" displayed for unspecified threshold values
Not all SEL entries have a "threshold value" specified, yet ipmitool sel elist always displays a threshold value (as "0.0"), even when one is not specified. Commit for Rob Swindell
This commit is contained in:
parent
c0f41fa647
commit
e8125c2405
@ -1739,6 +1739,7 @@ ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt)
|
|||||||
*/
|
*/
|
||||||
float trigger_reading = 0.0;
|
float trigger_reading = 0.0;
|
||||||
float threshold_reading = 0.0;
|
float threshold_reading = 0.0;
|
||||||
|
uint8_t threshold_reading_provided = 0;
|
||||||
|
|
||||||
/* trigger reading in event data byte 2 */
|
/* trigger reading in event data byte 2 */
|
||||||
if (((evt->sel_type.standard_type.event_data[0] >> 6) & 3) == 1) {
|
if (((evt->sel_type.standard_type.event_data[0] >> 6) & 3) == 1) {
|
||||||
@ -1750,6 +1751,7 @@ ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt)
|
|||||||
if (((evt->sel_type.standard_type.event_data[0] >> 4) & 3) == 1) {
|
if (((evt->sel_type.standard_type.event_data[0] >> 4) & 3) == 1) {
|
||||||
threshold_reading = sdr_convert_sensor_reading(
|
threshold_reading = sdr_convert_sensor_reading(
|
||||||
sdr->record.full, evt->sel_type.standard_type.event_data[2]);
|
sdr->record.full, evt->sel_type.standard_type.event_data[2]);
|
||||||
|
threshold_reading_provided = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (csv_output)
|
if (csv_output)
|
||||||
@ -1757,9 +1759,11 @@ ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt)
|
|||||||
else
|
else
|
||||||
printf(" | ");
|
printf(" | ");
|
||||||
|
|
||||||
printf("Reading %.*f %s Threshold %.*f %s",
|
printf("Reading %.*f",
|
||||||
(trigger_reading==(int)trigger_reading) ? 0 : 2,
|
(trigger_reading==(int)trigger_reading) ? 0 : 2,
|
||||||
trigger_reading,
|
trigger_reading);
|
||||||
|
if (threshold_reading_provided) {
|
||||||
|
printf(" %s Threshold %.*f %s",
|
||||||
((evt->sel_type.standard_type.event_data[0] & 0xf) % 2) ? ">" : "<",
|
((evt->sel_type.standard_type.event_data[0] & 0xf) % 2) ? ">" : "<",
|
||||||
(threshold_reading==(int)threshold_reading) ? 0 : 2,
|
(threshold_reading==(int)threshold_reading) ? 0 : 2,
|
||||||
threshold_reading,
|
threshold_reading,
|
||||||
@ -1768,6 +1772,7 @@ ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt)
|
|||||||
sdr->record.common->unit.type.base,
|
sdr->record.common->unit.type.base,
|
||||||
sdr->record.common->unit.type.modifier));
|
sdr->record.common->unit.type.modifier));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (evt->sel_type.standard_type.event_type == 0x6f) {
|
else if (evt->sel_type.standard_type.event_type == 0x6f) {
|
||||||
/*
|
/*
|
||||||
* Sensor-Specific Discrete
|
* Sensor-Specific Discrete
|
||||||
|
Loading…
x
Reference in New Issue
Block a user