cper-section-firmware.c (205dd1d7e443486831bdeb36b269629c49b7f06c) cper-section-firmware.c (3ab351fe5f23568c5a2284d769937916d60e4c3d)
1/**
2 * Describes functions for converting firmware CPER sections from binary and JSON format
3 * into an intermediate format.
4 *
5 * Author: Lawrence.Tang@arm.com
6 **/
7#include <stdio.h>
8#include "json.h"

--- 35 unchanged lines hidden (view full) ---

44 //Record fields.
45 section_cper->ErrorType = readable_pair_to_integer(json_object_object_get(section, "errorRecordType"));
46 section_cper->Revision = json_object_get_int(json_object_object_get(section, "revision"));
47 section_cper->RecordId = json_object_get_uint64(json_object_object_get(section, "revision"));
48 string_to_guid(&section_cper->RecordIdGuid,
49 json_object_get_string(json_object_object_get(section, "recordIDGUID")));
50
51 //Write to stream, free resources.
1/**
2 * Describes functions for converting firmware CPER sections from binary and JSON format
3 * into an intermediate format.
4 *
5 * Author: Lawrence.Tang@arm.com
6 **/
7#include <stdio.h>
8#include "json.h"

--- 35 unchanged lines hidden (view full) ---

44 //Record fields.
45 section_cper->ErrorType = readable_pair_to_integer(json_object_object_get(section, "errorRecordType"));
46 section_cper->Revision = json_object_get_int(json_object_object_get(section, "revision"));
47 section_cper->RecordId = json_object_get_uint64(json_object_object_get(section, "revision"));
48 string_to_guid(&section_cper->RecordIdGuid,
49 json_object_get_string(json_object_object_get(section, "recordIDGUID")));
50
51 //Write to stream, free resources.
52 fwrite(&section_cper, sizeof(section_cper), 1, out);
52 fwrite(section_cper, sizeof(EFI_FIRMWARE_ERROR_DATA), 1, out);
53 fflush(out);
54 free(section_cper);
55}
53 fflush(out);
54 free(section_cper);
55}