discover_system_state: fix ifdef ONLY_RUN_APR_ON_POWER_LOSS always true
ONLY_RUN_APR_ON_POWER_LOSS is defined as 0 or 1 in config.h, it should
use `#if ONLY_RUN_APR_ON_POWER_LOSS` instead of
`#ifdef ONLY_RUN_APR_ON_POWER_LOSS`, otherwise it will be true
statement all the time.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I36d1d0071c0c2c6b3d34d2d9f58d4ea0b4334cb7
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index 6227ddf..8dfe004 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -178,7 +178,7 @@
// Always execute power on if AlwaysOn is set, otherwise check config
// option (and AC loss status) on whether to execute other policy
// settings
-#ifdef ONLY_RUN_APR_ON_POWER_LOSS
+#if ONLY_RUN_APR_ON_POWER_LOSS
else if (!phosphor::state::manager::utils::checkACLoss(hostId))
{
info(