PEL: Print Failing MTMS section into JSON
Remove any trailing whitespace for serial number.
"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4552",
"Machine Type Model": "OPWR-131",
"Serial Number": "1318ABA"
},
Testing: Manually run peltool and verified output. All unit tests
passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I7a05790bdf406ef6d7946ffae831a45ee6dd5cda
diff --git a/extensions/openpower-pels/json_utils.hpp b/extensions/openpower-pels/json_utils.hpp
index f3fb767..e122f47 100644
--- a/extensions/openpower-pels/json_utils.hpp
+++ b/extensions/openpower-pels/json_utils.hpp
@@ -76,5 +76,12 @@
return numString;
}
+/**
+ * @brief helper function to trim trailing whitespaces
+ * @return std::string - trimmed string
+ * @param[in] std::string - string to trim
+ */
+std::string trimEnd(std::string s);
+
} // namespace pels
} // namespace openpower