aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-06-08 14:46:17 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-06-18 22:13:43 -0500
commit1839d2c714f825689ee61b66adb41726e2d14099 (patch)
treed918f82537d633b9554718cf248bdeeb4a84c77e
parentded1f6e1abf5d5d1afdbf62e558ec9eca22f1658 (diff)
downloadskiboot-1839d2c714f825689ee61b66adb41726e2d14099.zip
skiboot-1839d2c714f825689ee61b66adb41726e2d14099.tar.gz
skiboot-1839d2c714f825689ee61b66adb41726e2d14099.tar.bz2
ipmi-sel: use opal_booting() over poking at debug descriptor
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--hw/ipmi/ipmi-sel.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index 3386854..466fcb2 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -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 {
@@ -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 {