Hi All,
Sensors not owned by the Baseboard Management Controler are not correctly
managed
by ipmitool.
The SDR Repository holds SDRs from BMC as well as from satellite controlers.
SDRs and SELs contain information ( I2c slave address and Lun) to identify
the owner
of sensors or the generator ID of Sel entry and that should be used to
access sensors.
Currently, only ipmi_sdr_get_sensor_reading_ipmb() exists and is partially
used, but
all aother functions for get sensor threshold, hysteresis, event status,
event enabling,
print sensor, print sel entries, . should be modified in order to include
sensor I2c
address and lun as arguments of calling functions.
If you agree with this analysis, the attached patch file fixes this problem.
Moreover, I think that other modifications should be done for finding by id
a sensor or fru
in the SDR repository. (ie: the owner_id argument should be added to
ipmi_sdr_find_sdr_byid()
and all calling codes should also be modified.)
===============================================================
Bernard MANJOU
System Software Development R&D
phone : +33 (0) 1 30 80 73 50
mailto:[EMAIL PROTECTED]
Bull, Architect of an Open World TM
http://www.bull.com
Rue Jaures, BP 68, 78340 Les Clayes-sous-Bois, France
diff -Naur ipmitool-1.8.9/include/ipmitool/ipmi_sdr.h
ipmitool-1.8.9_patch/include/ipmitool/ipmi_sdr.h
--- ipmitool-1.8.9/include/ipmitool/ipmi_sdr.h 2007-02-22 09:38:55.000000000
+0100
+++ ipmitool-1.8.9_patch/include/ipmitool/ipmi_sdr.h 2008-06-04
15:47:57.000000000 +0200
@@ -820,9 +820,11 @@
uint8_t target,
uint8_t lun);
struct ipmi_rs *ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf,
- uint8_t sensor);
+ uint8_t sensor,
+ uint8_t target, uint8_t lun);
struct ipmi_rs *ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf,
- uint8_t sensor);
+ uint8_t sensor,
+ uint8_t target, uint8_t lun);
const char *ipmi_sdr_get_sensor_type_desc(const uint8_t type);
int ipmi_sdr_get_reservation(struct ipmi_intf *intf, uint16_t * reserve_id);
@@ -845,7 +847,7 @@
struct sdr_record_list *ipmi_sdr_find_sdr_byentity(struct ipmi_intf *intf,
struct entity_id *entity);
struct sdr_record_list *ipmi_sdr_find_sdr_bynumtype(struct ipmi_intf *intf,
- uint8_t num, uint8_t type);
+ uint16_t gen_id, uint8_t num, uint8_t
type);
struct sdr_record_list *ipmi_sdr_find_sdr_bysensortype(struct ipmi_intf *intf,
uint8_t type);
struct sdr_record_list *ipmi_sdr_find_sdr_byid(struct ipmi_intf *intf,
@@ -864,9 +866,11 @@
uint8_t state1, uint8_t state2);
int ipmi_sdr_print_sensor_event_status(struct ipmi_intf *intf,
uint8_t sensor_num, uint8_t sensor_type,
- uint8_t event_type, int numeric_fmt);
+ uint8_t event_type, int numeric_fmt,
+ uint8_t target, uint8_t lun);
int ipmi_sdr_print_sensor_event_enable(struct ipmi_intf *intf,
uint8_t sensor_num, uint8_t sensor_type,
- uint8_t event_type, int numeric_fmt);
+ uint8_t event_type, int numeric_fmt,
+ uint8_t target, uint8_t lun);
#endif /* IPMI_SDR_H */
diff -Naur ipmitool-1.8.9/lib/ipmi_event.c ipmitool-1.8.9_patch/lib/ipmi_event.c
--- ipmitool-1.8.9/lib/ipmi_event.c 2007-02-22 09:38:56.000000000 +0100
+++ ipmitool-1.8.9_patch/lib/ipmi_event.c 2008-06-03 17:13:00.000000000
+0200
@@ -241,6 +241,7 @@
struct sdr_record_list * sdr;
struct platform_event_msg emsg;
int off;
+ uint8_t target, lun;
if (id == NULL) {
lprintf(LOG_ERR, "No sensor ID supplied");
@@ -276,6 +277,8 @@
emsg.sensor_type = sdr->record.full->sensor.type;
emsg.sensor_num = sdr->record.full->keys.sensor_num;
emsg.event_type = sdr->record.full->event_type;
+ target = sdr->record.full->keys.owner_id;
+ lun = sdr->record.full->keys.lun;
break;
case SDR_RECORD_TYPE_COMPACT_SENSOR:
@@ -283,6 +286,8 @@
emsg.sensor_type = sdr->record.compact->sensor.type;
emsg.sensor_num = sdr->record.compact->keys.sensor_num;
emsg.event_type = sdr->record.compact->event_type;
+ target = sdr->record.compact->keys.owner_id;
+ lun = sdr->record.compact->keys.lun;
break;
default:
@@ -347,14 +352,16 @@
return -1;
}
- rsp = ipmi_sdr_get_sensor_thresholds(intf, emsg.sensor_num);
+ rsp = ipmi_sdr_get_sensor_thresholds(intf, emsg.sensor_num,
+ target, lun);
if (rsp != NULL && rsp->ccode == 0) {
/* threshold reading */
emsg.event_data[2] = rsp->data[(emsg.event_data[0] / 2)
+ 1];
- rsp = ipmi_sdr_get_sensor_hysteresis(intf,
emsg.sensor_num);
+ rsp = ipmi_sdr_get_sensor_hysteresis(intf,
emsg.sensor_num,
+ target, lun);
if (rsp != NULL && rsp->ccode == 0)
off = dir ? rsp->data[0] : rsp->data[1];
if (off <= 0)
diff -Naur ipmitool-1.8.9/lib/ipmi_sdr.c ipmitool-1.8.9_patch/lib/ipmi_sdr.c
--- ipmitool-1.8.9/lib/ipmi_sdr.c 2007-03-06 23:15:37.000000000 +0100
+++ ipmitool-1.8.9_patch/lib/ipmi_sdr.c 2008-06-03 17:48:25.000000000 +0200
@@ -364,13 +364,21 @@
*
* @intf: ipmi interface
* @sensor: sensor number
+ * @target: sensor owner ID
+ * @lun: sensor lun
*
* returns pointer to ipmi response
*/
struct ipmi_rs *
-ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf, uint8_t sensor)
+ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf, uint8_t sensor,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rq req;
+ struct ipmi_rs *rsp;
+ uint8_t save_addr;
+
+ save_addr = intf->target_addr;
+ intf->target_addr = target;
memset(&req, 0, sizeof (req));
req.msg.netfn = IPMI_NETFN_SE;
@@ -378,21 +386,31 @@
req.msg.data = &sensor;
req.msg.data_len = sizeof (sensor);
- return intf->sendrecv(intf, &req);
+ rsp = intf->sendrecv(intf, &req);
+ intf->target_addr = save_addr;
+ return rsp;
}
/* ipmi_sdr_get_sensor_hysteresis - return hysteresis for sensor
*
* @intf: ipmi interface
* @sensor: sensor number
+ * @target: sensor owner ID
+ * @lun: sensor lun
*
* returns pointer to ipmi response
*/
struct ipmi_rs *
-ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf, uint8_t sensor)
+ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf, uint8_t sensor,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rq req;
uint8_t rqdata[2];
+ struct ipmi_rs *rsp;
+ uint8_t save_addr;
+
+ save_addr = intf->target_addr;
+ intf->target_addr = target;
rqdata[0] = sensor;
rqdata[1] = 0xff; /* reserved */
@@ -403,7 +421,9 @@
req.msg.data = rqdata;
req.msg.data_len = 2;
- return intf->sendrecv(intf, &req);
+ rsp = intf->sendrecv(intf, &req);
+ intf->target_addr = save_addr;
+ return rsp;
}
/* ipmi_sdr_get_sensor_reading - retrieve a raw sensor reading
@@ -462,13 +482,21 @@
*
* @intf: ipmi interface
* @sensor: sensor id
+ * @target: sensor owner ID
+ * @lun: sensor lun
*
* returns ipmi response structure
*/
struct ipmi_rs *
-ipmi_sdr_get_sensor_event_status(struct ipmi_intf *intf, uint8_t sensor)
+ipmi_sdr_get_sensor_event_status(struct ipmi_intf *intf, uint8_t sensor,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rq req;
+ struct ipmi_rs *rsp;
+ uint8_t save_addr;
+
+ save_addr = intf->target_addr;
+ intf->target_addr = target;
memset(&req, 0, sizeof (req));
req.msg.netfn = IPMI_NETFN_SE;
@@ -476,20 +504,30 @@
req.msg.data = &sensor;
req.msg.data_len = 1;
- return intf->sendrecv(intf, &req);
+ rsp = intf->sendrecv(intf, &req);
+ intf->target_addr = save_addr;
+ return rsp;
}
/* ipmi_sdr_get_sensor_event_enable - retrieve sensor event enables
*
* @intf: ipmi interface
* @sensor: sensor id
+ * @target: sensor owner ID
+ * @lun: sensor lun
*
* returns ipmi response structure
*/
struct ipmi_rs *
-ipmi_sdr_get_sensor_event_enable(struct ipmi_intf *intf, uint8_t sensor)
+ipmi_sdr_get_sensor_event_enable(struct ipmi_intf *intf, uint8_t sensor,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rq req;
+ struct ipmi_rs *rsp;
+ uint8_t save_addr;
+
+ save_addr = intf->target_addr;
+ intf->target_addr = target;
memset(&req, 0, sizeof (req));
req.msg.netfn = IPMI_NETFN_SE;
@@ -497,7 +535,9 @@
req.msg.data = &sensor;
req.msg.data_len = 1;
- return intf->sendrecv(intf, &req);
+ rsp = intf->sendrecv(intf, &req);
+ intf->target_addr = save_addr;
+ return rsp;
}
/* ipmi_sdr_get_sensor_type_desc - Get sensor type descriptor
@@ -739,7 +779,8 @@
ipmi_sdr_print_sensor_event_status(struct ipmi_intf *intf,
uint8_t sensor_num,
uint8_t sensor_type,
- uint8_t event_type, int numeric_fmt)
+ uint8_t event_type, int numeric_fmt,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rs *rsp;
int i;
@@ -762,7 +803,8 @@
{0x00, NULL},
};
- rsp = ipmi_sdr_get_sensor_event_status(intf, sensor_num);
+ rsp = ipmi_sdr_get_sensor_event_status(intf, sensor_num,
+ target, lun);
if (rsp == NULL) {
lprintf(LOG_DEBUG,
@@ -949,7 +991,8 @@
ipmi_sdr_print_sensor_event_enable(struct ipmi_intf *intf,
uint8_t sensor_num,
uint8_t sensor_type,
- uint8_t event_type, int numeric_fmt)
+ uint8_t event_type, int numeric_fmt,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rs *rsp;
int i;
@@ -972,7 +1015,8 @@
{0x00, NULL},
};
- rsp = ipmi_sdr_get_sensor_event_enable(intf, sensor_num);
+ rsp = ipmi_sdr_get_sensor_event_enable(intf, sensor_num,
+ target, lun);
if (rsp == NULL) {
lprintf(LOG_DEBUG,
@@ -1083,10 +1127,14 @@
int i = 0, validread = 1, do_unit = 1;
double val = 0.0, creading = 0.0;
struct ipmi_rs *rsp;
+ uint8_t target, lun;
if (sensor == NULL)
return -1;
+ target = sensor->keys.owner_id;
+ lun = sensor->keys.lun;
+
memset(desc, 0, sizeof (desc));
snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string);
@@ -1097,7 +1145,9 @@
}
/* 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) {
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
@@ -1314,12 +1364,16 @@
sensor->keys.sensor_num,
sensor->sensor.type,
sensor->event_type,
- DISCRETE_SENSOR);
+ DISCRETE_SENSOR,
+ target,
+ lun);
ipmi_sdr_print_sensor_event_enable(intf,
sensor->keys.sensor_num,
sensor->sensor.type,
sensor->event_type,
- DISCRETE_SENSOR);
+ DISCRETE_SENSOR,
+ target,
+ lun);
printf("\n");
return 0; /* done */
@@ -1488,12 +1542,16 @@
ipmi_sdr_print_sensor_event_status(intf,
sensor->keys.sensor_num,
sensor->sensor.type,
- sensor->event_type, ANALOG_SENSOR);
+ sensor->event_type, ANALOG_SENSOR,
+ target,
+ lun);
ipmi_sdr_print_sensor_event_enable(intf,
sensor->keys.sensor_num,
sensor->sensor.type,
- sensor->event_type, ANALOG_SENSOR);
+ sensor->event_type, ANALOG_SENSOR,
+ target,
+ lun);
printf("\n");
return 0;
@@ -1640,15 +1698,21 @@
struct ipmi_rs *rsp;
char desc[17];
int validread = 1;
+ uint8_t target, lun;
if (sensor == NULL)
return -1;
+ target = sensor->keys.owner_id;
+ lun = sensor->keys.lun;
+
memset(desc, 0, sizeof (desc));
snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string);
/* 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) {
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x)",
desc, sensor->keys.sensor_num);
@@ -1706,12 +1770,16 @@
sensor->keys.sensor_num,
sensor->sensor.type,
sensor->event_type,
- DISCRETE_SENSOR);
+ DISCRETE_SENSOR,
+ target,
+ lun);
ipmi_sdr_print_sensor_event_enable(intf,
sensor->keys.sensor_num,
sensor->sensor.type,
sensor->event_type,
- DISCRETE_SENSOR);
+ DISCRETE_SENSOR,
+ target,
+ lun);
printf("\n");
} else {
int dostate = 1;
@@ -2815,6 +2883,7 @@
/* ipmi_sdr_find_sdr_bynumtype - lookup SDR entry by number/type
*
* @intf: ipmi interface
+ * @gen_id: sensor owner ID/LUN - SEL generator ID
* @num: sensor number to search for
* @type: sensor type to search for
*
@@ -2822,7 +2891,7 @@
* returns NULL on error
*/
struct sdr_record_list *
-ipmi_sdr_find_sdr_bynumtype(struct ipmi_intf *intf, uint8_t num, uint8_t type)
+ipmi_sdr_find_sdr_bynumtype(struct ipmi_intf *intf, uint16_t gen_id, uint8_t
num, uint8_t type)
{
struct sdr_get_rs *header;
struct sdr_record_list *e;
@@ -2841,16 +2910,19 @@
switch (e->type) {
case SDR_RECORD_TYPE_FULL_SENSOR:
if (e->record.full->keys.sensor_num == num &&
+ e->record.full->keys.owner_id == (gen_id & 0x00ff)
&&
e->record.full->sensor.type == type)
return e;
break;
case SDR_RECORD_TYPE_COMPACT_SENSOR:
if (e->record.compact->keys.sensor_num == num &&
+ e->record.compact->keys.owner_id == (gen_id &
0x00ff) &&
e->record.compact->sensor.type == type)
return e;
break;
case SDR_RECORD_TYPE_EVENTONLY_SENSOR:
if (e->record.eventonly->keys.sensor_num == num &&
+ e->record.eventonly->keys.owner_id == (gen_id &
0x00ff) &&
e->record.eventonly->sensor_type == type)
return e;
break;
@@ -2880,6 +2952,7 @@
sdrr->record.full =
(struct sdr_record_full_sensor *) rec;
if (sdrr->record.full->keys.sensor_num == num
+ && sdrr->record.full->keys.owner_id == (gen_id &
0x00ff)
&& sdrr->record.full->sensor.type == type)
found = 1;
break;
@@ -2887,6 +2960,7 @@
sdrr->record.compact =
(struct sdr_record_compact_sensor *) rec;
if (sdrr->record.compact->keys.sensor_num == num
+ && sdrr->record.compact->keys.owner_id == (gen_id &
0x00ff)
&& sdrr->record.compact->sensor.type == type)
found = 1;
break;
@@ -2894,6 +2968,7 @@
sdrr->record.eventonly =
(struct sdr_record_eventonly_sensor *) rec;
if (sdrr->record.eventonly->keys.sensor_num == num
+ && sdrr->record.eventonly->keys.owner_id == (gen_id
& 0x00ff)
&& sdrr->record.eventonly->sensor_type == type)
found = 1;
break;
diff -Naur ipmitool-1.8.9/lib/ipmi_sel.c ipmitool-1.8.9_patch/lib/ipmi_sel.c
--- ipmitool-1.8.9/lib/ipmi_sel.c 2007-03-06 23:15:37.000000000 +0100
+++ ipmitool-1.8.9_patch/lib/ipmi_sel.c 2008-06-10 16:04:08.000000000 +0200
@@ -911,7 +911,7 @@
int data_count;
if (sel_extended && (evt->record_type < 0xc0))
- sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt->sel_type.standard_type.sensor_num,
evt->sel_type.standard_type.sensor_type);
+ sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt->sel_type.standard_type.gen_id, evt->sel_type.standard_type.sensor_num,
evt->sel_type.standard_type.sensor_type);
if (!evt)
@@ -1223,6 +1223,7 @@
return;
sdr = ipmi_sdr_find_sdr_bynumtype(intf,
+ evt->sel_type.standard_type.gen_id,
evt->sel_type.standard_type.sensor_num,
evt->sel_type.standard_type.sensor_type);
if (sdr == NULL) {
@@ -1841,7 +1842,7 @@
/* lookup SDR entry based on sensor number and type */
ipmi_sel_print_extended_entry_verbose(intf, &evt);
- sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt.sel_type.standard_type.sensor_num, evt.sel_type.standard_type.sensor_type);
+ sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt.sel_type.standard_type.gen_id, evt.sel_type.standard_type.sensor_num,
evt.sel_type.standard_type.sensor_type);
if (sdr == NULL) {
continue;
}
diff -Naur ipmitool-1.8.9/lib/ipmi_sensor.c
ipmitool-1.8.9_patch/lib/ipmi_sensor.c
--- ipmitool-1.8.9/lib/ipmi_sensor.c 2007-02-22 09:38:57.000000000 +0100
+++ ipmitool-1.8.9_patch/lib/ipmi_sensor.c 2008-06-04 15:41:52.000000000
+0200
@@ -50,10 +50,13 @@
struct ipmi_rs *
ipmi_sensor_set_sensor_thresholds(struct ipmi_intf *intf,
uint8_t sensor,
- uint8_t threshold, uint8_t setting)
+ uint8_t threshold, uint8_t setting,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rq req;
static struct sensor_set_thresh_rq set_thresh_rq;
+ struct ipmi_rs *rsp;
+ uint8_t save_addr;
memset(&set_thresh_rq, 0, sizeof (set_thresh_rq));
set_thresh_rq.sensor_num = sensor;
@@ -73,13 +76,18 @@
else
return NULL;
+ save_addr = intf->target_addr;
+ intf->target_addr = target;
+
memset(&req, 0, sizeof (req));
req.msg.netfn = IPMI_NETFN_SE;
req.msg.cmd = SET_SENSOR_THRESHOLDS;
req.msg.data = (uint8_t *) & set_thresh_rq;
req.msg.data_len = sizeof (set_thresh_rq);
- return intf->sendrecv(intf, &req);
+ rsp = intf->sendrecv(intf, &req);
+ intf->target_addr = save_addr;
+ return rsp;
}
static int
@@ -231,7 +239,8 @@
/*
* Get sensor thresholds
*/
- rsp = ipmi_sdr_get_sensor_thresholds(intf, sensor->keys.sensor_num);
+ rsp = ipmi_sdr_get_sensor_thresholds(intf, sensor->keys.sensor_num,
+ sensor->keys.owner_id, sensor->keys.lun);
if (rsp == NULL)
thresh_available = 0;
@@ -381,13 +390,17 @@
sensor_num,
sensor->sensor.type,
sensor->event_type,
- ANALOG_SENSOR);
+ ANALOG_SENSOR,
+
sensor->keys.owner_id,
+ sensor->keys.lun);
ipmi_sdr_print_sensor_event_enable(intf,
sensor->keys.
sensor_num,
sensor->sensor.type,
sensor->event_type,
- ANALOG_SENSOR);
+ ANALOG_SENSOR,
+
sensor->keys.owner_id,
+ sensor->keys.lun);
printf("\n");
}
@@ -549,11 +562,13 @@
static int
__ipmi_sensor_set_threshold(struct ipmi_intf *intf,
- uint8_t num, uint8_t mask, uint8_t setting)
+ uint8_t num, uint8_t mask, uint8_t setting,
+ uint8_t target, uint8_t lun)
{
struct ipmi_rs *rsp;
- rsp = ipmi_sensor_set_sensor_thresholds(intf, num, mask, setting);
+ rsp = ipmi_sensor_set_sensor_thresholds(intf, num, mask, setting,
+ target, lun);
if (rsp == NULL) {
lprintf(LOG_ERR, "Error setting threshold");
@@ -678,7 +693,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting1));
+ (sdr->record.full, setting1),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
settingMask = UPPER_CRIT_SPECIFIED;
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
@@ -688,7 +705,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting2));
+ (sdr->record.full, setting2),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
settingMask = UPPER_NON_RECOV_SPECIFIED;
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
@@ -698,7 +717,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting3));
+ (sdr->record.full, setting3),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
} else if (allLower) {
settingMask = LOWER_NON_RECOV_SPECIFIED;
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
@@ -708,7 +729,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting1));
+ (sdr->record.full, setting1),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
settingMask = LOWER_CRIT_SPECIFIED;
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
@@ -718,7 +741,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting2));
+ (sdr->record.full, setting2),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
settingMask = LOWER_NON_CRIT_SPECIFIED;
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
@@ -728,7 +753,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting3));
+ (sdr->record.full, setting3),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
} else {
printf("Setting sensor \"%s\" %s threshold to %.3f\n",
sdr->record.full->id_string,
@@ -738,7 +765,9 @@
sdr->record.full->keys.
sensor_num, settingMask,
sdr_convert_sensor_value_to_raw
- (sdr->record.full, setting1));
+ (sdr->record.full, setting1),
+
sdr->record.full->keys.owner_id,
+ sdr->record.full->keys.lun);
}
return ret;
diff -Naur ipmitool-1.8.9/src/ipmievd.c ipmitool-1.8.9_patch/src/ipmievd.c
--- ipmitool-1.8.9/src/ipmievd.c 2007-03-06 23:15:37.000000000 +0100
+++ ipmitool-1.8.9_patch/src/ipmievd.c 2008-06-09 17:41:58.000000000 +0200
@@ -212,7 +212,7 @@
ipmi_get_event_desc(intf, evt, &desc);
- sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt->sel_type.standard_type.sensor_num,
+ sdr = ipmi_sdr_find_sdr_bynumtype(intf,
evt->sel_type.standard_type.gen_id, evt->sel_type.standard_type.sensor_num,
evt->sel_type.standard_type.sensor_type);
if (sdr == NULL) {
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel