1 #ifndef CPER_UTILS_H 2 #define CPER_UTILS_H 3 4 #define GUID_STRING_LENGTH 30 5 #define TIMESTAMP_LENGTH 24 6 7 json_object* integer_to_readable_pair(int value, int len, int keys[], const char* values[], const char* default_value); 8 json_object* bitfield_to_ir(UINT64 bitfield, int num_fields, const char* names[]); 9 json_object* revision_to_ir(UINT16 revision); 10 const char* severity_to_string(UINT8 severity); 11 void guid_to_string(char* out, EFI_GUID* guid); 12 int guid_equal(EFI_GUID* a, EFI_GUID* b); 13 14 //The available severity types for CPER. 15 extern const char* CPER_SEVERITY_TYPES[4]; 16 17 #endif