pinhole: utility interface to create errors
This will be utilized in later commit to create an informational error
when the pinhole reset is detected
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I3ba0e9bbce306db29dcc70954ffafe90287e1a14
diff --git a/utils.hpp b/utils.hpp
index 0127206..004d97a 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/Logging/Entry/server.hpp>
namespace phosphor
{
@@ -42,6 +43,16 @@
*/
int getGpioValue(const std::string& gpioName);
+/** @brief Create an error log
+ *
+ * @param[in] bus - The Dbus bus object
+ * @param[in] errorMsg - The error message
+ * @param[in] errLevel - The error level
+ */
+void createError(
+ sdbusplus::bus::bus& bus, const std::string& errorMsg,
+ sdbusplus::xyz::openbmc_project::Logging::server::Entry::Level errLevel);
+
} // namespace utils
} // namespace manager
} // namespace state