summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-11-21 13:06:35 -0600
committerMatt Spinler <spinler@us.ibm.com>2019-12-09 13:47:57 -0600
commit346f99a1526114d6c50e7d2e010dfc8a151ec80e (patch)
treec42f84aec1056433372b1f793ca53d0d669c47aa /extensions
parentab1b97fe0af268c98113dd474443f28253ba9ddd (diff)
downloadphosphor-logging-346f99a1526114d6c50e7d2e010dfc8a151ec80e.tar.gz
phosphor-logging-346f99a1526114d6c50e7d2e010dfc8a151ec80e.zip
PEL: Save tran states in the repo attributes
Save the host and HMC (Hardware Management Console) transmission states in the PEL attributes map so that external callers can get to them without having to unflatten a PEL from the filesystem. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: If8b396d3c342af2c7a3c34f4f1bb0a7da075e47c
Diffstat (limited to 'extensions')
-rw-r--r--extensions/openpower-pels/repository.cpp9
-rw-r--r--extensions/openpower-pels/repository.hpp8
2 files changed, 12 insertions, 5 deletions
diff --git a/extensions/openpower-pels/repository.cpp b/extensions/openpower-pels/repository.cpp
index 3aeecb6..a21b0fa 100644
--- a/extensions/openpower-pels/repository.cpp
+++ b/extensions/openpower-pels/repository.cpp
@@ -58,8 +58,9 @@ void Repository::restore()
PEL pel{data};
if (pel.valid())
{
- PELAttributes attributes{dirEntry.path(),
- pel.userHeader().actionFlags()};
+ PELAttributes attributes{
+ dirEntry.path(), pel.userHeader().actionFlags(),
+ pel.hostTransmissionState(), pel.hmcTransmissionState()};
using pelID = LogID::Pel;
using obmcID = LogID::Obmc;
@@ -99,7 +100,9 @@ void Repository::add(std::unique_ptr<PEL>& pel)
write(*(pel.get()), path);
- PELAttributes attributes{path, pel->userHeader().actionFlags()};
+ PELAttributes attributes{path, pel->userHeader().actionFlags(),
+ pel->hostTransmissionState(),
+ pel->hmcTransmissionState()};
using pelID = LogID::Pel;
using obmcID = LogID::Obmc;
diff --git a/extensions/openpower-pels/repository.hpp b/extensions/openpower-pels/repository.hpp
index 0832f58..70e8e61 100644
--- a/extensions/openpower-pels/repository.hpp
+++ b/extensions/openpower-pels/repository.hpp
@@ -27,11 +27,15 @@ class Repository
{
std::filesystem::path path;
std::bitset<16> actionFlags;
+ TransmissionState hostState;
+ TransmissionState hmcState;
PELAttributes() = delete;
- PELAttributes(const std::filesystem::path& path, uint16_t flags) :
- path(path), actionFlags(flags)
+ PELAttributes(const std::filesystem::path& p, uint16_t flags,
+ TransmissionState hostState, TransmissionState hmcState) :
+ path(p),
+ actionFlags(flags), hostState(hostState), hmcState(hmcState)
{
}
};
OpenPOWER on IntegriCloud