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.cpp b/extensions/openpower-pels/registry.cpp
index c8f10d7..755e829 100644
--- a/extensions/openpower-pels/registry.cpp
+++ b/extensions/openpower-pels/registry.cpp
@@ -15,6 +15,7 @@
*/
#include "registry.hpp"
+#include "json_utils.hpp"
#include "pel_types.hpp"
#include "pel_values.hpp"
@@ -220,8 +221,9 @@
}
auto attributes = word.value();
- std::string adPropName = attributes["AdditionalDataPropSource"];
- hexwordFields[wordNum] = std::move(adPropName);
+ std::tuple<std::string, std::string> adPropSourceDesc(
+ attributes["AdditionalDataPropSource"], attributes["Description"]);
+ hexwordFields[wordNum] = std::move(adPropSourceDesc);
}
if (!hexwordFields.empty())