ID: 50 - ipmi_hpmfwupg needs a clean up

HpmfwupgManualFirmwareRollback() - kill one level of indentation.
This commit is contained in:
Zdenek Styblik 2013-10-10 11:56:04 +00:00
parent 80c03570ac
commit 7b5683d85d

View File

@ -2083,23 +2083,22 @@ HpmfwupgManualFirmwareRollback(struct ipmi_intf *intf,
req.msg.data = (unsigned char*)&pCtx->req; req.msg.data = (unsigned char*)&pCtx->req;
req.msg.data_len = sizeof(struct HpmfwupgManualFirmwareRollbackReq); req.msg.data_len = sizeof(struct HpmfwupgManualFirmwareRollbackReq);
rsp = HpmfwupgSendCmd(intf, req, &fwupgCtx); rsp = HpmfwupgSendCmd(intf, req, &fwupgCtx);
if (rsp) { if (rsp == NULL) {
/* Long duration command handling */ lprintf(LOG_ERR, "Error sending manual rollback.");
if (rsp->ccode == IPMI_CC_OK return HPMFWUPG_ERROR;
|| rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS) { }
struct HpmfwupgQueryRollbackStatusCtx resCmd; /* Long duration command handling */
printf("Waiting firmware rollback..."); if (rsp->ccode == IPMI_CC_OK
fflush(stdout); || rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS) {
rc = HpmfwupgQueryRollbackStatus(intf, &resCmd, &fwupgCtx); struct HpmfwupgQueryRollbackStatusCtx resCmd;
} else if ( rsp->ccode != 0x00 ) { printf("Waiting firmware rollback...");
lprintf(LOG_NOTICE,"Error sending manual rollback"); fflush(stdout);
lprintf(LOG_NOTICE,"compcode=0x%x: %s", rc = HpmfwupgQueryRollbackStatus(intf, &resCmd, &fwupgCtx);
rsp->ccode, } else if ( rsp->ccode != 0x00 ) {
val2str(rsp->ccode, completion_code_vals)); lprintf(LOG_ERR, "Error sending manual rollback");
rc = HPMFWUPG_ERROR; lprintf(LOG_ERR, "compcode=0x%x: %s",
} rsp->ccode,
} else { val2str(rsp->ccode, completion_code_vals));
lprintf(LOG_NOTICE, "Error sending manual rollback\n");
rc = HPMFWUPG_ERROR; rc = HPMFWUPG_ERROR;
} }
return rc; return rc;