Lines Matching +full:- +full:encoded

11 #include <libcper/cper-utils.h>
12 #include <libcper/sections/cper-section-cxl-component.h>
24 if (cxl_error->Length < sizeof(EFI_CXL_COMPONENT_EVENT_HEADER)) { in cper_section_cxl_component_to_ir()
27 if (size < cxl_error->Length) { in cper_section_cxl_component_to_ir()
34 json_object_new_uint64(cxl_error->Length)); in cper_section_cxl_component_to_ir()
38 .value.ui64 = cxl_error->ValidBits }; in cper_section_cxl_component_to_ir()
45 json_object_new_int(cxl_error->DeviceId.VendorId)); in cper_section_cxl_component_to_ir()
48 json_object_new_int(cxl_error->DeviceId.DeviceId)); in cper_section_cxl_component_to_ir()
52 cxl_error->DeviceId.FunctionNumber)); in cper_section_cxl_component_to_ir()
55 json_object_new_int(cxl_error->DeviceId.DeviceNumber)); in cper_section_cxl_component_to_ir()
58 json_object_new_int(cxl_error->DeviceId.BusNumber)); in cper_section_cxl_component_to_ir()
61 json_object_new_int(cxl_error->DeviceId.SegmentNumber)); in cper_section_cxl_component_to_ir()
64 json_object_new_int(cxl_error->DeviceId.SlotNumber)); in cper_section_cxl_component_to_ir()
72 json_object_new_uint64(cxl_error->DeviceSerial)); in cper_section_cxl_component_to_ir()
78 int remaining_len = cxl_error->Length - in cper_section_cxl_component_to_ir()
83 char *encoded = base64_encode(cur_pos, remaining_len, in cper_section_cxl_component_to_ir() local
85 if (encoded == NULL) { in cper_section_cxl_component_to_ir()
95 encoded, encoded_len)); in cper_section_cxl_component_to_ir()
97 free(encoded); in cper_section_cxl_component_to_ir()
106 //Converts a single given CXL Component CPER-JSON section into CPER binary, outputting to the
115 section_cper->Length = json_object_get_uint64( in ir_section_cxl_component_to_cper()
125 section_cper->DeviceId.VendorId = json_object_get_uint64( in ir_section_cxl_component_to_cper()
127 section_cper->DeviceId.DeviceId = json_object_get_uint64( in ir_section_cxl_component_to_cper()
129 section_cper->DeviceId.FunctionNumber = json_object_get_uint64( in ir_section_cxl_component_to_cper()
131 section_cper->DeviceId.DeviceNumber = json_object_get_uint64( in ir_section_cxl_component_to_cper()
133 section_cper->DeviceId.BusNumber = json_object_get_uint64( in ir_section_cxl_component_to_cper()
135 section_cper->DeviceId.SegmentNumber = json_object_get_uint64( in ir_section_cxl_component_to_cper()
137 section_cper->DeviceId.SlotNumber = json_object_get_uint64( in ir_section_cxl_component_to_cper()
144 section_cper->DeviceSerial = json_object_get_uint64(obj); in ir_section_cxl_component_to_cper()
154 section_cper->ValidBits = ui64Type.value.ui64; in ir_section_cxl_component_to_cper()
161 json_object *encoded = in ir_section_cxl_component_to_cper() local
167 json_object_get_string(encoded), in ir_section_cxl_component_to_cper()
168 json_object_get_string_len(encoded), &decoded_len); in ir_section_cxl_component_to_cper()