Create instance specific host state object
Some day we may support multiple host instances. For
now we're just going to hard code to instance 0.
Change-Id: I2c52d138177172563da5ddf0217053324a6999fd
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/host_state_manager_main.cpp b/host_state_manager_main.cpp
index 07314e1..13f2667 100644
--- a/host_state_manager_main.cpp
+++ b/host_state_manager_main.cpp
@@ -9,11 +9,15 @@
{
auto bus = sdbusplus::bus::new_default();
+ // For now, we only have one instance of the host
+ auto objPathInst = std::string{OBJPATH} + '0';
+
phosphor::state::manager::Host manager(bus,
BUSNAME,
- OBJPATH);
+ objPathInst.c_str());
+
// Add sdbusplus ObjectManager.
- sdbusplus::server::manager::manager objManager(bus, OBJPATH);
+ sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
bus.request_name(BUSNAME);