event: Remove in favor of sdeventplus
Use the new library provided to all openbmc projects instead of rolling
our own managed pointer.
Tested: Compiled
Change-Id: I4993d4340e0e0aa5898e73ef815baa81b0e8a2bc
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/power-sequencer/main.cpp b/power-sequencer/main.cpp
index 87b8070..e383fc1 100644
--- a/power-sequencer/main.cpp
+++ b/power-sequencer/main.cpp
@@ -16,6 +16,7 @@
#include <chrono>
#include <iostream>
#include <phosphor-logging/log.hpp>
+#include <sdeventplus/event.hpp>
#include "argument.hpp"
#include "pgood_monitor.hpp"
#include "runtime_monitor.hpp"
@@ -45,16 +46,7 @@
std::chrono::milliseconds interval{i};
- sd_event* e = nullptr;
- auto r = sd_event_default(&e);
- if (r < 0)
- {
- log<level::ERR>("sd_event_default() failed",
- entry("ERROR=%s", strerror(-r)));
- exit(EXIT_FAILURE);
- }
-
- event::Event event{e};
+ auto event = sdeventplus::Event::get_default();
auto bus = sdbusplus::bus::new_default();
bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);