mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID:343 - Print actual sensor thresholds in 'sensors' comand
Use Get Sensor Threshold command for obtaining thresholds, since SDR records may contain not actual threhsolds.
This commit is contained in:
parent
f56d740d98
commit
0eaa2eae51
@ -892,8 +892,20 @@ ipmi_sensor_get(struct ipmi_intf *intf, int argc, char **argv)
|
||||
/* need to set verbose level to 1 */
|
||||
v = verbose;
|
||||
verbose = 1;
|
||||
if (ipmi_sdr_print_listentry(intf, sdr) < 0) {
|
||||
rc = (-1);
|
||||
switch (sdr->type) {
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
if (ipmi_sensor_print_fc(intf,
|
||||
(struct sdr_record_common_sensor *) sdr->record.common,
|
||||
sdr->type)) {
|
||||
rc = -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (ipmi_sdr_print_listentry(intf, sdr) < 0) {
|
||||
rc = (-1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
verbose = v;
|
||||
sdr = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user