#
81bc5611 |
| 01-Jun-2023 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Fixes for gcc13
* Add the cstdint header file as now required to get the uint* types. * Fix a move assignment test * Refactor some nlohmann::json code to avoid:
``` /usr/include/c++/13/valarra
PEL: Fixes for gcc13
* Add the cstdint header file as now required to get the uint* types. * Fix a move assignment test * Refactor some nlohmann::json code to avoid:
``` /usr/include/c++/13/valarray:1201:1: note: template argument deduction/substitution failed: ../extensions/openpower-pels/registry.cpp:665:43: note: ‘const nlohmann::json_abi_v3_11_2::basic_json<>::value_type’ {aka ‘const nlohmann::json_abi_v3_11_2::basic_json<>’} is not derived from ‘const std::valarray<_Tp>’ 665 | (name == j["SRC"]["ReasonCode"] && type == LookupType::reasonCode)); ```
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ia3e733602134a60008d0d47934f95a217d2a0eb1
show more ...
|
#
3fdcd4e8 |
| 25-Aug-2020 |
Harisuddin Mohamed Isa <harisuddin@gmail.com> |
PEL: Fixed Userdata section parsing A previous commit incorrectly tries to call python parsers when they do not exist. This fixes it. Signed-off-by: Harisuddin Mohamed Isa <hari
PEL: Fixed Userdata section parsing A previous commit incorrectly tries to call python parsers when they do not exist. This fixes it. Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com> Change-Id: I6e65bc89e60b9ac31077009921d4376ddc8254bf
show more ...
|
#
f67bafd0 |
| 06-Jul-2020 |
Harisuddin Mohamed Isa <harisuddin@gmail.com> |
PEL: Python3 module support for UserData parsing This change enables the calling of python3 parsers for UserData section. Modules will be searched under the namespace "udparsers" from py
PEL: Python3 module support for UserData parsing This change enables the calling of python3 parsers for UserData section. Modules will be searched under the namespace "udparsers" from python3 sys.path directories (including the current directory). Example: /usr/lib/python3.8/site-packages/udparsers/bxxxx/bxxxx.py or ./udparsers/bxxxx/bxxxx.py where b = Creator Subsystem ID for Hostboot xxxx = Component ID of UserData section The parsers will need to provide a function called "parseUDToJson" with input parameters: 1. (int) Sub-section type 2. (int) Section version 3. (memoryview): Data The return value needs to be a valid JSON string. Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com> Change-Id: I4d3523083bc48ad0c329c525d83c4a61d36ff611
show more ...
|
#
acb7c106 |
| 10-Jan-2020 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Print the JSON formatted UserData Override the getJSON() function in the UserData section so it will support peltool pretty printing when the data has been stored as JSON (comp
PEL: Print the JSON formatted UserData Override the getJSON() function in the UserData section so it will support peltool pretty printing when the data has been stored as JSON (component phosphor-logging, subtype 1 as defined in user_data_formats.hpp). It first converts the original JSON string to a nlohmann::json object to validate it is valid JSON and then uses nlohmann::json's stream << operator to convert it into a pretty string. This also sets up a framework where other UserData parsing functions can be called from, and it is all only compiled into peltool, and not into phosphor-log-manager. The UserData section created out of the OpenBMC event log's AdditionalData property already makes use of this format. Here are some example outputs. Note that the 'Data' key is added by this code for JSON that isn't already an object (dict) to make it one. "User Data": { "OPERATION": "something", "REGISTER_FFDC": "REG1=0x8|REG2=0x9|REG3=0x55", "RETURN_VALUE": "-12", "TIMEOUT_IN_MSEC": "100", "_PID": "993" }, "User Data": { "Data": [ "OPERATION", "REGISTER_FFDC", "RETURN_VALUE", "TIMEOUT_IN_MSEC", "_PID" ] }, "User Data": { "Data": "This is a string" } Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I7b034ac24339b5b019db3b57d8e71cb03559363e
show more ...
|