ID: 50 - ipmi_hpmfwupg needs a clean up

HpmfwupgQueryRollbackStatus() - kill one level of indentation.
This commit is contained in:
Zdenek Styblik 2013-10-10 12:04:52 +00:00
parent 7b5683d85d
commit f56cea1253

View File

@ -2158,34 +2158,33 @@ HpmfwupgQueryRollbackStatus(struct ipmi_intf *intf,
|| (rsp->ccode == IPMI_CC_TIMEOUT)) || (rsp->ccode == IPMI_CC_TIMEOUT))
&& (timeoutSec2 - timeoutSec1 < rollbackTimeout)); && (timeoutSec2 - timeoutSec1 < rollbackTimeout));
if (rsp) { if (rsp) {
if (rsp->ccode == 0x00) { lprintf(LOG_ERR, "Error getting upgrade status.");
memcpy(&pCtx->resp, rsp->data, return HPMFWUPG_ERROR;
sizeof(struct HpmfwupgQueryRollbackStatusResp)); }
if (pCtx->resp.rollbackComp.ComponentBits.byte != 0) { if (rsp->ccode == 0x00) {
/* Rollback occured */ memcpy(&pCtx->resp, rsp->data,
lprintf(LOG_NOTICE, sizeof(struct HpmfwupgQueryRollbackStatusResp));
"Rollback occured on component mask: 0x%02x", if (pCtx->resp.rollbackComp.ComponentBits.byte != 0) {
pCtx->resp.rollbackComp.ComponentBits.byte); /* Rollback occured */
} else {
lprintf(LOG_NOTICE,
"No Firmware rollback occured");
}
} else if (rsp->ccode == 0x81) {
lprintf(LOG_NOTICE, lprintf(LOG_NOTICE,
"Rollback failed on component mask: 0x%02x", "Rollback occured on component mask: 0x%02x",
pCtx->resp.rollbackComp.ComponentBits.byte); pCtx->resp.rollbackComp.ComponentBits.byte);
rc = HPMFWUPG_ERROR;
} else { } else {
lprintf(LOG_NOTICE, lprintf(LOG_NOTICE,
"Error getting rollback status"); "No Firmware rollback occured");
lprintf(LOG_NOTICE,
"compcode=0x%x: %s",
rsp->ccode,
val2str(rsp->ccode, completion_code_vals));
rc = HPMFWUPG_ERROR;
} }
} else if (rsp->ccode == 0x81) {
lprintf(LOG_ERR,
"Rollback failed on component mask: 0x%02x",
pCtx->resp.rollbackComp.ComponentBits.byte);
rc = HPMFWUPG_ERROR;
} else { } else {
lprintf(LOG_NOTICE,"Error getting upgrade status\n"); lprintf(LOG_ERR,
"Error getting rollback status");
lprintf(LOG_ERR,
"compcode=0x%x: %s",
rsp->ccode,
val2str(rsp->ccode, completion_code_vals));
rc = HPMFWUPG_ERROR; rc = HPMFWUPG_ERROR;
} }
return rc; return rc;