fix chassis power status exit code

This commit is contained in:
Duncan Laurie 2005-04-21 04:13:55 +00:00
parent 7b3fac2071
commit 2c2437239d

View File

@ -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;
} }