Lines Matching full:header
19 json_object *cper_header_to_ir(EFI_COMMON_ERROR_RECORD_HEADER *header);
33 EFI_COMMON_ERROR_RECORD_HEADER header; in cper_to_ir() local
34 if (fread(&header, sizeof(EFI_COMMON_ERROR_RECORD_HEADER), 1, in cper_to_ir()
40 //Check if the header contains the magic bytes ("CPER"). in cper_to_ir()
41 if (header.SignatureStart != EFI_ERROR_RECORD_SIGNATURE_START) { in cper_to_ir()
42 printf("Invalid CPER file: Invalid header (incorrect signature).\n"); in cper_to_ir()
46 //Create the header JSON object from the read bytes. in cper_to_ir()
47 json_object *header_ir = cper_header_to_ir(&header); in cper_to_ir()
52 for (int i = 0; i < header.SectionCount; i++) { in cper_to_ir()
58 …printf("Invalid number of section headers: Header states %d sections, could not read section %d.\n… in cper_to_ir()
59 header.SectionCount, i + 1); in cper_to_ir()
76 //Add the header, section descriptors, and sections to a parent object. in cper_to_ir()
78 json_object_object_add(parent, "header", header_ir); in cper_to_ir()
102 //Converts a parsed CPER record header into intermediate JSON object format.
103 json_object *cper_header_to_ir(EFI_COMMON_ERROR_RECORD_HEADER *header) in cper_header_to_ir() argument
109 revision_to_ir(header->Revision)); in cper_header_to_ir()
113 json_object_new_int(header->SectionCount)); in cper_header_to_ir()
118 json_object_new_uint64(header->ErrorSeverity)); in cper_header_to_ir()
121 header->ErrorSeverity))); in cper_header_to_ir()
126 header->ValidationBits, 3, CPER_HEADER_VALID_BITFIELD_NAMES); in cper_header_to_ir()
131 json_object_new_uint64(header->RecordLength)); in cper_header_to_ir()
134 if (header->ValidationBits & 0x2) { in cper_header_to_ir()
137 &header->TimeStamp); in cper_header_to_ir()
144 json_object_new_boolean(header->TimeStamp.Flag)); in cper_header_to_ir()
148 if (header->ValidationBits & 0x1) { in cper_header_to_ir()
150 guid_to_string(platform_string, &header->PlatformID); in cper_header_to_ir()
156 if (header->ValidationBits & 0x4) { in cper_header_to_ir()
158 guid_to_string(partition_string, &header->PartitionID); in cper_header_to_ir()
164 //Creator ID of the header. in cper_header_to_ir()
166 guid_to_string(creator_string, &header->CreatorID); in cper_header_to_ir()
170 //Notification type for the header. Some defined types are available. in cper_header_to_ir()
173 guid_to_string(notification_type_string, &header->NotificationType); in cper_header_to_ir()
180 if (guid_equal(&header->NotificationType, in cper_header_to_ir()
183 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
186 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
189 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
192 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
195 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
198 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
201 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
204 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
207 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
210 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
213 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
225 json_object_new_uint64(header->RecordID)); in cper_header_to_ir()
229 header->Flags, in cper_header_to_ir()
237 json_object_new_uint64(header->PersistenceInfo)); in cper_header_to_ir()
247 //The offset of the section from the base of the record header, length. in cper_section_descriptor_to_ir()
390 //Converts a single CPER section, without a header but with a section descriptor, to JSON.