mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 02:57:22 +00:00
Jim Sievert ipmb sensor reading fix plus fix for strncmp/strcpy bug
This commit is contained in:
parent
1c784e80ec
commit
c3aefda148
@ -444,7 +444,7 @@ ipmi_sdr_get_sensor_reading_ipmb(struct ipmi_intf *intf, uint8_t sensor,
|
|||||||
struct ipmi_rs *rsp;
|
struct ipmi_rs *rsp;
|
||||||
uint8_t save_addr;
|
uint8_t save_addr;
|
||||||
|
|
||||||
if (strcpy(intf->name, "ipmb"))
|
if ((strncmp(intf->name, "ipmb", 4)) != 0)
|
||||||
return ipmi_sdr_get_sensor_reading(intf, sensor);
|
return ipmi_sdr_get_sensor_reading(intf, sensor);
|
||||||
|
|
||||||
save_addr = intf->target_addr;
|
save_addr = intf->target_addr;
|
||||||
@ -1103,7 +1103,8 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get sensor reading */
|
/* get sensor reading */
|
||||||
rsp = ipmi_sdr_get_sensor_reading(intf, sensor->keys.sensor_num);
|
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf, sensor->keys.sensor_num,
|
||||||
|
sensor->keys.owner_id, sensor->keys.lun);
|
||||||
|
|
||||||
if (rsp == NULL) {
|
if (rsp == NULL) {
|
||||||
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
|
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
|
||||||
@ -1654,7 +1655,8 @@ ipmi_sdr_print_sensor_compact(struct ipmi_intf *intf,
|
|||||||
snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string);
|
snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string);
|
||||||
|
|
||||||
/* get sensor reading */
|
/* get sensor reading */
|
||||||
rsp = ipmi_sdr_get_sensor_reading(intf, sensor->keys.sensor_num);
|
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf, sensor->keys.sensor_num,
|
||||||
|
sensor->keys.owner_id, sensor->keys.lun);
|
||||||
if (rsp == NULL) {
|
if (rsp == NULL) {
|
||||||
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
|
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
|
||||||
desc, sensor->keys.sensor_num);
|
desc, sensor->keys.sensor_num);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user