diff options
-rw-r--r-- | extensions/openpower-pels/pel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/openpower-pels/pel.cpp b/extensions/openpower-pels/pel.cpp index 2345e0e..e006541 100644 --- a/extensions/openpower-pels/pel.cpp +++ b/extensions/openpower-pels/pel.cpp @@ -195,6 +195,12 @@ std::unique_ptr<UserData> makeADUserDataSection(const AdditionalData& ad) auto jsonString = json.dump(); std::vector<uint8_t> jsonData(jsonString.begin(), jsonString.end()); + // Pad to a 4 byte boundary + while ((jsonData.size() % 4) != 0) + { + jsonData.push_back(0); + } + return std::make_unique<UserData>( static_cast<uint16_t>(ComponentID::phosphorLogging), static_cast<uint8_t>(UserDataFormat::json), |