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);
     }
diff --git a/extensions/openpower-pels/src.cpp b/extensions/openpower-pels/src.cpp
index 570c6c6..db84347 100644
--- a/extensions/openpower-pels/src.cpp
+++ b/extensions/openpower-pels/src.cpp
@@ -401,7 +401,14 @@
     jsonInsert(ps, "Created by", getNumberString("0x%X", _header.componentID),
                1);
     jsonInsert(ps, "SRC Version", getNumberString("0x%02X", _version), 1);
-    jsonInsert(ps, "SRC Format", getNumberString("0x%02X", _hexData[0]), 1);
+    jsonInsert(ps, "SRC Format", getNumberString("0x%02X", _hexData[0] & 0xFF),
+               1);
+    jsonInsert(ps, "Virtual Progress SRC",
+               pv::boolString.at(_flags & virtualProgressSRC), 1);
+    jsonInsert(ps, "I5/OS Service Event Bit",
+               pv::boolString.at(_flags & i5OSServiceEventBit), 1);
+    jsonInsert(ps, "Hypervisor Dump Initiated",
+               pv::boolString.at(_flags & hypDumpInit), 1);
     jsonInsert(ps, "Power Control Net Fault",
                pv::boolString.at(isPowerFaultEvent()), 1);
     rg::Registry registry(getMessageRegistryPath() / rg::registryFileName);