Get the initial IPMI SEL Record ID from syslog
Since the journal will not be persisted, IPMI SEL entries will be
stored in syslog instead. This changes the SEL Logger to get the
initial IPMI SEL Record ID from the persisten syslog instead of
the journal.
Tested:
1. Added an IPMI SEL entry by overriding a sensor.
2. Rebooted
3. Added an IPMI SEL entry by overriding a sensor.
4. Confirmed that the new SEL entry got the next Record ID and
did not restart at 1.
Change-Id: I85c2ebee66bb6b8d29c734d6bd05458a311845df
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/include/sel_logger.hpp b/include/sel_logger.hpp
index 28214e3..bd40dff 100644
--- a/include/sel_logger.hpp
+++ b/include/sel_logger.hpp
@@ -15,6 +15,7 @@
*/
#pragma once
+#include <filesystem>
static constexpr char const *ipmiSelObject = "xyz.openbmc_project.Logging.IPMI";
static constexpr char const *ipmiSelPath = "/xyz/openbmc_project/Logging/IPMI";
@@ -32,6 +33,9 @@
static constexpr size_t selEvtDataMaxSize = 3;
static constexpr size_t selOemDataMaxSize = 13;
+static const std::filesystem::path selLogDir = "/var/log";
+static const std::string selLogFilename = "ipmi_sel";
+
template <typename... T>
static uint16_t
selAddSystemRecord(const std::string &message, const std::string &path,