summaryrefslogtreecommitdiffstats
path: root/presence/tach_detect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'presence/tach_detect.cpp')
-rw-r--r--presence/tach_detect.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/presence/tach_detect.cpp b/presence/tach_detect.cpp
index da0f40f..9b23571 100644
--- a/presence/tach_detect.cpp
+++ b/presence/tach_detect.cpp
@@ -15,24 +15,20 @@
*/
#include "generated.hpp"
#include "sdbusplus.hpp"
-#include "sdevent.hpp"
-
+#include <sdeventplus/event.hpp>
int main(void)
{
using namespace phosphor::fan;
- auto& event = util::SDEvent::getEvent();
- event.attach(util::SDBusPlus::getBus());
+ auto event = sdeventplus::Event::get_default();
+ util::SDBusPlus::getBus().attach_event(
+ event.get(), SD_EVENT_PRIORITY_NORMAL);
for (auto& p: presence::ConfigPolicy::get())
{
p->monitor();
}
- event.loop();
-
- // The loop should never exit. Exit with
- // non zero status just in case.
- return 1;
+ return event.loop();
}
OpenPOWER on IntegriCloud