mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
break down ccode on error
This commit is contained in:
parent
1cf302c89e
commit
6cdcd8555a
@ -247,8 +247,15 @@ static void ipmi_chassis_status(struct ipmi_intf * intf)
|
|||||||
req.msg.cmd = 0x1;
|
req.msg.cmd = 0x1;
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode)
|
if (!rsp) {
|
||||||
|
printf("Error sending Chassis Status command\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
if (rsp->ccode > 0) {
|
||||||
|
printf("Error sending Chassis Status command: %s\n",
|
||||||
|
val2str(rsp->ccode, completion_code_vals));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* byte 1 */
|
/* byte 1 */
|
||||||
printf("System Power : %s\n", (rsp->data[0] & 0x1) ? "on" : "off");
|
printf("System Power : %s\n", (rsp->data[0] & 0x1) ? "on" : "off");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user