move systemd subscribe to util function
This code is replicated in multiple source files in this repo, put it in
the util repo so everyone can call it in one place.
Tested:
- Verified systemd signals seen and system boots
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I8bf0343c79012cc91dea033038894a011fd37ef5
diff --git a/utils.hpp b/utils.hpp
index 9c1dd18..cbb7248 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -12,6 +12,14 @@
namespace utils
{
+/** @brief Tell systemd to generate d-bus events
+ *
+ * @param[in] bus - The Dbus bus object
+ *
+ * @return void, will throw exception on failure
+ */
+void subscribeToSystemdSignals(sdbusplus::bus::bus& bus);
+
/** @brief Get service name from object path and interface
*
* @param[in] bus - The Dbus bus object