Skip to content

Commit

Permalink
ipmi-sel: use opal_booting() over poking at debug descriptor
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Jun 19, 2018
1 parent ded1f6e commit 1839d2c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hw/ipmi/ipmi-sel.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ static void sel_power(uint8_t power)
switch (power) {
case SOFT_OFF:
prlog(PR_NOTICE, "Soft shutdown requested\n");
if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
platform.cec_power_down) {
if (opal_booting() && platform.cec_power_down) {
prlog(PR_NOTICE, "Host not up, shutting down now\n");
platform.cec_power_down(IPMI_CHASSIS_PWR_DOWN);
} else {
Expand All @@ -515,8 +514,7 @@ static void sel_power(uint8_t power)
break;
case SOFT_REBOOT:
prlog(PR_NOTICE, "Soft reboot requested\n");
if (!(debug_descriptor.state_flags & OPAL_BOOT_COMPLETE) &&
platform.cec_reboot) {
if (opal_booting() && platform.cec_reboot) {
prlog(PR_NOTICE, "Host not up, rebooting now\n");
platform.cec_reboot();
} else {
Expand Down

0 comments on commit 1839d2c

Please sign in to comment.