main: use `new_bus` instead of `new_system`
The `new_system` function always creates a connection to the system
bus, but `new_bus` will select the connection appropriate based on
the user. This is generally the preference across the OpenBMC project
and allows running the application in development environments.
Leverage the new "take a bus r-value" form of the
`sdbusplus::asio::connection` to simplify the constructor call.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If68a369898cdf2703d90794ed67460759f1c710b
diff --git a/main.cpp b/main.cpp
index 35dd59b..d823966 100644
--- a/main.cpp
+++ b/main.cpp
@@ -82,10 +82,8 @@
/* buses for system control */
static sdbusplus::asio::connection modeControlBus(io);
-static sdbusplus::asio::connection hostBus(
- io, sdbusplus::bus::new_system().release());
-static sdbusplus::asio::connection passiveBus(
- io, sdbusplus::bus::new_system().release());
+static sdbusplus::asio::connection hostBus(io, sdbusplus::bus::new_bus());
+static sdbusplus::asio::connection passiveBus(io, sdbusplus::bus::new_bus());
namespace pid_control
{