mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
fix chassis power status exit code
This commit is contained in:
parent
7b3fac2071
commit
2c2437239d
@ -74,8 +74,12 @@ ipmi_chassis_power_status(struct ipmi_intf * intf)
|
|||||||
static int
|
static int
|
||||||
ipmi_chassis_print_power_status(struct ipmi_intf * intf)
|
ipmi_chassis_print_power_status(struct ipmi_intf * intf)
|
||||||
{
|
{
|
||||||
printf("Chassis Power is %s\n",
|
int ps = ipmi_chassis_power_status(intf);
|
||||||
ipmi_chassis_power_status(intf) ? "on" : "off");
|
|
||||||
|
if (ps < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
printf("Chassis Power is %s\n", ps ? "on" : "off");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user