diff options
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | extensions/openpower-pels/entry_points.cpp | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8481175..657424d 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,13 @@ AS_IF([test "x$enable_openpower_pel_extension" == "xyes"], AX_PKG_CHECK_MODULES([LIBPLDM], [libpldm])] ) +AC_ARG_ENABLE([dont-send-pels-to-host], + AS_HELP_STRING([--enable-dont-send-pels-to-host], + [Do not send PELs to the host. \ + Only applies when PELs are enabled.]), + [AX_APPEND_COMPILE_FLAGS([-DDONT_SEND_PELS_TO_HOST])] +) + AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile test/Makefile phosphor-rsyslog-config/Makefile]) AC_CONFIG_FILES([phosphor-logging.pc]) diff --git a/extensions/openpower-pels/entry_points.cpp b/extensions/openpower-pels/entry_points.cpp index b454d37..5c6e714 100644 --- a/extensions/openpower-pels/entry_points.cpp +++ b/extensions/openpower-pels/entry_points.cpp @@ -17,6 +17,7 @@ #include "elog_entry.hpp" #include "extensions.hpp" #include "manager.hpp" +#include "pldm_interface.hpp" namespace openpower { @@ -32,7 +33,15 @@ void pelStartup(internal::Manager& logManager) std::unique_ptr<DataInterfaceBase> dataIface = std::make_unique<DataInterface>(logManager.getBus()); +#ifndef DONT_SEND_PELS_TO_HOST + std::unique_ptr<HostInterface> hostIface = std::make_unique<PLDMInterface>( + logManager.getBus().get_event(), *(dataIface.get())); + + manager = std::make_unique<Manager>(logManager, std::move(dataIface), + std::move(hostIface)); +#else manager = std::make_unique<Manager>(logManager, std::move(dataIface)); +#endif } REGISTER_EXTENSION_FUNCTION(pelStartup); |