Fix singleton issue for not passing correct argument
Use reference to create instance instead of an object
Note:
1. User must revise the OBMC_HOST_INSTANCES in project
configuration file to correctly execute sled cycle.
2. The reason to revise is that OBMC_HOST_INSTANCES and
OBMC_CHASSIS_INSTANCES are 1 to 1 relationship defined in
phosphor-state-manager-systemd-links.inc
3. After revision, BMC creats a object path which is not used called
/xyz/openbmc_project/state/boot/raw0 under xyz.openbmc_project.State.Boot.Raw
Test Case:
Check the correcponding Dbus match path is created
Signed-off-by: Bonnie Lo <Bonnie_Lo@wiwynn.com>
Change-Id: I84e5658c1919dc758efade4bd13122610997c067
diff --git a/src/main.cpp b/src/main.cpp
index 7048dd2..026558a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,7 +19,7 @@
int main(int argc, char* argv[])
{
- PostCodeDataHolder postcodeDataHolderObj =
+ PostCodeDataHolder& postcodeDataHolderObj =
PostCodeDataHolder::getInstance();
int arg;