ID: 3612237 - If DCMI command fails, incorrect completion code is printed

If any DCMI command fails, the function chk_rsp() in ipmi_dcmi.c displays the
incorrect byte as the completion code.

$ ipmitool dcmi power activate
DCMI request failed because: Unspecified error (dc)

The "dc" value printed is actually the "Group extension identification" byte
which *always* has the value 0xdc for DCMI responses.

Commit for Rob Swindell
This commit is contained in:
Zdenek Styblik 2013-06-02 12:58:47 +00:00
parent b0020e0bae
commit 384618d1bc

View File

@ -379,11 +379,11 @@ static int chk_rsp(struct ipmi_rs * rsp) {
*/
if ((rsp->ccode >= 0x80) && (rsp->ccode <= 0x8F)) {
lprintf(LOG_ERR, "\n DCMI request failed because: %s (%x)",
val2str(rsp->ccode, dcmi_ccode_vals), rsp->data[0]);
val2str(rsp->ccode, dcmi_ccode_vals), rsp->ccode);
return 1;
} else if (rsp->ccode > 0) {
lprintf(LOG_ERR, "\n DCMI request failed because: %s (%x)",
val2str(rsp->ccode, completion_code_vals), rsp->data[0]);
val2str(rsp->ccode, completion_code_vals), rsp->ccode);
return 1;
}