trim extra bytes from data

This commit is contained in:
Duncan Laurie 2005-01-21 16:04:34 +00:00
parent b8d8587b2a
commit 658b502e64

View File

@ -132,7 +132,10 @@ ipmi_bmc_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
rsp.ccode = reqrsp.rsp.ccode;
rsp.data_len = reqrsp.rsp.datalength;
if (!rsp.ccode && rsp.data_len)
/* Decrement for sizeof lun, cmd and ccode */
rsp.data_len -= 3;
if (!rsp.ccode && (rsp.data_len > 0))
memcpy(rsp.data, reqrsp.rsp.data, rsp.data_len);
return (&rsp);