peltool: Print the Words6To9 'Description' field
Include the 'Description' field from the Words6To9 registry entry when printing
SRC error details.
Changed from this:
"Error Details": {
"Message": "There was a failure when reading a sensor device",
"CALLOUT_ERRNO": "0x5"
}
to this:
"Error Details": {
"Message": "There was a failure when reading a sensor device",
"CALLOUT_ERRNO": [
"0x5",
"errno of the failure"
]
}
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Icc107b0516062eb891f14f3ff3f3cffd316c6d77
diff --git a/extensions/openpower-pels/registry.hpp b/extensions/openpower-pels/registry.hpp
index 7a13b58..180090c 100644
--- a/extensions/openpower-pels/registry.hpp
+++ b/extensions/openpower-pels/registry.hpp
@@ -99,10 +99,13 @@
* SRC hexwords.
*
* For example, if the AdditionalData event log property contained
- * "CHIPNUM=42" and this map contained {6, CHIPNUM}, then the code
- * would put 42 into SRC hexword 6.
+ * "CHIPNUM=42" and this map contained {6, {"CHIPNUM", "DESC"}}, then the
+ * code would put 42 into SRC hexword 6.
+ *
+ * AdditionalDataField specifies two fields from the SRC entry in the
+ * message registry: "AdditionalDataPropSource" and "Description"
*/
- using AdditionalDataField = std::string;
+ using AdditionalDataField = std::tuple<std::string, std::string>;
std::optional<std::map<WordNum, AdditionalDataField>> hexwordADFields;
SRC() : type(0), reasonCode(0)