summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--control/manager.cpp28
-rw-r--r--control/manager.hpp5
2 files changed, 8 insertions, 25 deletions
diff --git a/control/manager.cpp b/control/manager.cpp
index a322c10..1078473 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -122,26 +122,14 @@ void Manager::doInit()
delay = sleep(delay);
}
- startFanControlReadyTarget();
-}
-
-
-void Manager::startFanControlReadyTarget()
-{
- auto method = _bus.new_method_call(SYSTEMD_SERVICE,
- SYSTEMD_OBJ_PATH,
- SYSTEMD_INTERFACE,
- "StartUnit");
-
- method.append(FAN_CONTROL_READY_TARGET);
- method.append("replace");
-
- auto response = _bus.call(method);
- if (response.is_method_error())
- {
- log<level::ERR>("Failed to start fan control ready target");
- elog<InternalFailure>();
- }
+ util::SDBusPlus::callMethod(
+ _bus,
+ SYSTEMD_SERVICE,
+ SYSTEMD_OBJ_PATH,
+ SYSTEMD_INTERFACE,
+ "StartUnit",
+ FAN_CONTROL_READY_TARGET,
+ "replace");
}
} // namespace control
diff --git a/control/manager.hpp b/control/manager.hpp
index d5b75fc..d049323 100644
--- a/control/manager.hpp
+++ b/control/manager.hpp
@@ -53,11 +53,6 @@ class Manager
private:
/**
- * Starts the obmc-fan-control-ready dbus target
- */
- void startFanControlReadyTarget();
-
- /**
* The dbus object
*/
sdbusplus::bus::bus& _bus;
OpenPOWER on IntegriCloud