PEL: Print OBMC event log ID in peltool
In the PrivateHeader section, add an entry into peltool's JSON
output for the OpenBMC event log ID.
This is a reserved field in the PEL spec, but we are using it to
associate the PEL to the BMC event log it came from.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id347aa67f79d7f5fac1e572de100755df7b29e6e
diff --git a/extensions/openpower-pels/private_header.cpp b/extensions/openpower-pels/private_header.cpp
index 19deaba..1bf54ca 100644
--- a/extensions/openpower-pels/private_header.cpp
+++ b/extensions/openpower-pels/private_header.cpp
@@ -114,6 +114,7 @@
std::string phPlatformIDStr(tmpPhVal);
sprintf(tmpPhVal, "0x%X", _id);
std::string phLogEntryIDStr(tmpPhVal);
+ std::string phObmcIDStr = std::to_string(_obmcLogID);
std::string ph;
jsonInsert(ph, "Section Version", phVerStr, 1);
jsonInsert(ph, "Sub-section type", phStStr, 1);
@@ -124,6 +125,7 @@
jsonInsert(ph, "CSSVER", phCreatorVersionStr, 1);
jsonInsert(ph, "Platform Log Id", phPlatformIDStr, 1);
jsonInsert(ph, "Entry Id", phLogEntryIDStr, 1);
+ jsonInsert(ph, "BMC Event Log Id", phObmcIDStr, 1);
ph.erase(ph.size() - 2);
return ph;