summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh D. King <jdking@us.ibm.com>2017-05-16 13:35:21 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-05-19 14:42:03 +0000
commit222014e0f3e06d6850d78d2f6972ac07e14a0b8c (patch)
treea633fbd0bf92eaf988fdf94f67e72b4bbaf49bee
parent29d025dadc07173e19f91ad0e47f4c4f8aa87737 (diff)
downloadphosphor-state-manager-222014e0f3e06d6850d78d2f6972ac07e14a0b8c.tar.gz
phosphor-state-manager-222014e0f3e06d6850d78d2f6972ac07e14a0b8c.zip
Remove use of system manager
Host state manager used to use system manager in order to check whether it is running or not. Now we are directly checking the target. Change-Id: Idb3a72685b58770833c2c9056b9c75ac67703dc5 Signed-off-by: Josh D. King <jdking@us.ibm.com>
-rw-r--r--host_state_manager.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index fd89cf6..6731432 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -36,10 +36,6 @@ constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1";
constexpr auto SYSTEMD_OBJ_PATH = "/org/freedesktop/systemd1";
constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
-constexpr auto SYSTEM_SERVICE = "org.openbmc.managers.System";
-constexpr auto SYSTEM_OBJ_PATH = "/org/openbmc/managers/System";
-constexpr auto SYSTEM_INTERFACE = SYSTEM_SERVICE;
-
constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper";
@@ -71,22 +67,10 @@ void Host::subscribeToSystemdSignals()
return;
}
-// TODO - Will be rewritten once sdbusplus client bindings are in place
-// and persistent storage design is in place
void Host::determineInitialState()
{
- std::string sysState;
-
- auto method = this->bus.new_method_call(SYSTEM_SERVICE,
- SYSTEM_OBJ_PATH,
- SYSTEM_INTERFACE,
- "getSystemState");
-
- auto reply = this->bus.call(method);
-
- reply.read(sysState);
- if(sysState == "HOST_BOOTED")
+ if(stateActive(HOST_STATE_POWERON_TGT))
{
log<level::INFO>("Initial Host State will be Running",
entry("CURRENT_HOST_STATE=%s",
OpenPOWER on IntegriCloud