Append node number to dbus names more directly
This way we don't needlessly duplicate the string constants.
Change-Id: Iba0a19ae3a95472fb25c61fa0cf612bd75d4fcab
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index f0bdd3b..3646ca1 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -3123,12 +3123,12 @@
conn->request_name(rstCauseDbusName.c_str());
}
- hostDbusName = "xyz.openbmc_project.State.Host" + node;
- chassisDbusName = "xyz.openbmc_project.State.Chassis" + node;
- osDbusName = "xyz.openbmc_project.State.OperatingSystem" + node;
- buttonDbusName = "xyz.openbmc_project.Chassis.Buttons" + node;
- nmiDbusName = "xyz.openbmc_project.Control.Host.NMI" + node;
- rstCauseDbusName = "xyz.openbmc_project.Control.Host.RestartCause" + node;
+ hostDbusName += node;
+ chassisDbusName += node;
+ osDbusName += node;
+ buttonDbusName += node;
+ nmiDbusName += node;
+ rstCauseDbusName += node;
// Request all the dbus names
conn->request_name(hostDbusName.c_str());