diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/host-error-monitor')
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor/0001-Static-analyser-issue-resolution.patch b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor/0001-Static-analyser-issue-resolution.patch new file mode 100644 index 000000000..7440df946 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor/0001-Static-analyser-issue-resolution.patch @@ -0,0 +1,35 @@ +From a9d4919f7eb92fecbcea141200ca04507fa8c73b Mon Sep 17 00:00:00 2001 +From: Yaswanth Reddy M <yaswanthx.reddy.munukuru@intel.com> +Date: Thu, 5 Oct 2023 12:50:39 +0000 +Subject: [PATCH] Fix for static analyser tool reported issues. + +In this code, we first save the original format flags of std::cerr +using std::ios_base::fmtflags originalFlags = std::cerr.flags(). +Then, we can modify the format flags as needed. Finally, after +using the modified format flags, we restore the original format +flags using std::cerr.flags(originalFlags); + +Signed-off-by: Yaswanth Reddy M <yaswanthx.reddy.munukuru@intel.com> +--- + include/host_error_monitor.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/host_error_monitor.hpp b/include/host_error_monitor.hpp +index 4bccdcc..a4aa5a3 100644 +--- a/include/host_error_monitor.hpp ++++ b/include/host_error_monitor.hpp +@@ -169,9 +169,11 @@ static inline bool peciError(EPECIStatus peciStatus, uint8_t cc) + static void printPECIError(const std::string& reg, const size_t addr, + const EPECIStatus peciStatus, const size_t cc) + { ++ std::ios_base::fmtflags originalFlags = std::cerr.flags(); + std::cerr << "Failed to read " << reg << " on CPU address " << std::dec + << addr << ". Error: " << peciStatus << ": cc: 0x" << std::hex + << cc << "\n"; ++ std::cerr.flags(originalFlags); + } + + static void beep(std::shared_ptr<sdbusplus::asio::connection> conn, +-- +2.25.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend index 26e9a2ea5..0479c2b6f 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend @@ -1,6 +1,11 @@ # The URI is required for the autobump script but keep it commented # to not override the upstream value # SRC_URI = "git://github.com/openbmc/host-error-monitor;branch=master;protocol=https" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + SRCREV = "ed6972aefe37a039d5b41d183eafc8c48549be67" +SRC_URI += " \ + file://0001-Static-analyser-issue-resolution.patch \ + " EXTRA_OECMAKE = "-DYOCTO=1" |