PEL: Fix SRC Format and more SRC flags in peltool
"Primary SRC": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4552",
"SRC Version": "0x02",
"SRC Format": "0x60",
"Virtual Progress SRC": "False",
"I5/OS Service Event Bit": "False",
"Hypervisor Dump Initiated":"False",
"Power Control Net Fault": "False",
"Valid Word Count": "0x04",
"Reference Code": "B700F142",
"Hex Word 2": "00000060",
"Hex Word 3": "00000001",
"Hex Word 4": "00000005"
}
Testing: Manually run peltool and verified output. All unit tests
passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: Ic510b4bcae5eba0ac3cf52f83a10dfa3fb48e533
diff --git a/extensions/openpower-pels/json_utils.cpp b/extensions/openpower-pels/json_utils.cpp
index a25311c..cd41804 100644
--- a/extensions/openpower-pels/json_utils.cpp
+++ b/extensions/openpower-pels/json_utils.cpp
@@ -145,7 +145,7 @@
colAlign - (indentCount * indentLevel) - fieldName.length() - 3;
const std::string jsonIndent(indentCount * indentLevel, 0x20);
jsonStr.append(jsonIndent + "\"" + fieldName + "\":");
- if (spacesToAppend > 0)
+ if (spacesToAppend >= 0)
{
jsonStr.append(spacesToAppend, 0x20);
}