mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 46 - ipmi_fwum needs some re-work
KfwumStartFirmwareUpgrade() - code formatting
This commit is contained in:
parent
043c42160e
commit
0a4a5cafbc
@ -1126,12 +1126,14 @@ static tKFWUM_Status KfwumUploadFirmware(struct ipmi_intf * intf,
|
||||
return(status);
|
||||
}
|
||||
|
||||
static tKFWUM_Status KfwumStartFirmwareUpgrade(struct ipmi_intf * intf)
|
||||
static tKFWUM_Status
|
||||
KfwumStartFirmwareUpgrade(struct ipmi_intf *intf)
|
||||
{
|
||||
tKFWUM_Status status = KFWUM_STATUS_OK;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
unsigned char upgType = 0 ; /* Upgrade type, wait BMC shutdown */
|
||||
/* Upgrade type, wait BMC shutdown */
|
||||
unsigned char upgType = 0 ;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_FIRMWARE;
|
||||
@ -1140,26 +1142,21 @@ static tKFWUM_Status KfwumStartFirmwareUpgrade(struct ipmi_intf * intf)
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
if (!rsp)
|
||||
{
|
||||
printf("Error in FWUM Firmware Start Firmware Upgrade Command\n");
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR,
|
||||
"Error in FWUM Firmware Start Firmware Upgrade Command");
|
||||
status = KFWUM_STATUS_ERROR;
|
||||
}
|
||||
else if (rsp->ccode)
|
||||
{
|
||||
if(rsp->ccode == 0xd5)
|
||||
{
|
||||
printf("No firmware available for upgrade. Download Firmware first\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("FWUM Firmware Start Firmware Upgrade returned %x\n",
|
||||
} else if (rsp->ccode) {
|
||||
if (rsp->ccode == 0xd5) {
|
||||
lprintf(LOG_ERR,
|
||||
"No firmware available for upgrade. Download Firmware first.");
|
||||
} else {
|
||||
lprintf(LOG_ERR,
|
||||
"FWUM Firmware Start Firmware Upgrade returned %x",
|
||||
rsp->ccode);
|
||||
}
|
||||
status = KFWUM_STATUS_ERROR;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user