xref: /openbmc/libcper/cper-parse.h (revision 12c1f65d)
1 #ifndef CPER_PARSE_H
2 #define CPER_PARSE_H
3 #include "json.h"
4 
5 #define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformIDValid", "timestampValid", "partitionIDValid"}
6 #define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \
7     {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \
8     "propagated", "overflow"}
9 #define CPER_HEADER_FLAG_TYPES_KEYS (int []){1, 2, 3}
10 #define CPER_HEADER_FLAG_TYPES_VALUES (const char*[]){"HW_ERROR_FLAGS_RECOVERED", "HW_ERROR_FLAGS_PREVERR", "HW_ERROR_FLAGS_SIMULATED"}
11 
12 json_object* cper_to_ir(FILE* cper_file);
13 void ir_to_cper(json_object* ir, FILE* out);
14 
15 #endif