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()
77 //Add the header, section descriptors, and sections to a parent object. in cper_to_ir()
79 json_object_object_add(parent, "header", header_ir); in cper_to_ir()
103 //Converts a parsed CPER record header into intermediate JSON object format.
104 json_object *cper_header_to_ir(EFI_COMMON_ERROR_RECORD_HEADER *header) in cper_header_to_ir() argument
110 revision_to_ir(header->Revision)); in cper_header_to_ir()
114 json_object_new_int(header->SectionCount)); in cper_header_to_ir()
119 json_object_new_uint64(header->ErrorSeverity)); in cper_header_to_ir()
122 header->ErrorSeverity))); in cper_header_to_ir()
127 json_object_new_uint64(header->RecordLength)); in cper_header_to_ir()
130 if (header->ValidationBits & 0x2) { in cper_header_to_ir()
133 &header->TimeStamp); in cper_header_to_ir()
140 json_object_new_boolean(header->TimeStamp.Flag)); in cper_header_to_ir()
144 if (header->ValidationBits & 0x1) { in cper_header_to_ir()
146 guid_to_string(platform_string, &header->PlatformID); in cper_header_to_ir()
152 if (header->ValidationBits & 0x4) { in cper_header_to_ir()
154 guid_to_string(partition_string, &header->PartitionID); in cper_header_to_ir()
160 //Creator ID of the header. in cper_header_to_ir()
162 guid_to_string(creator_string, &header->CreatorID); in cper_header_to_ir()
166 //Notification type for the header. Some defined types are available. in cper_header_to_ir()
169 guid_to_string(notification_type_string, &header->NotificationType); in cper_header_to_ir()
176 if (guid_equal(&header->NotificationType, in cper_header_to_ir()
179 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
182 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
185 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
188 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
191 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
194 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
197 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
200 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
203 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
206 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
209 } else if (guid_equal(&header->NotificationType, in cper_header_to_ir()
221 json_object_new_uint64(header->RecordID)); in cper_header_to_ir()
225 header->Flags, in cper_header_to_ir()
233 json_object_new_uint64(header->PersistenceInfo)); in cper_header_to_ir()
243 //The offset of the section from the base of the record header, length. in cper_section_descriptor_to_ir()
379 //Converts a single CPER section, without a header but with a section descriptor, to JSON.