| 1332 | } |
| 1333 | |
| 1334 | static int cbfstool_convert_mkflatpayload(struct buffer *buffer, |
| 1335 | unused uint32_t *offset, struct cbfs_file *header) |
| 1336 | { |
| 1337 | struct buffer output; |
| 1338 | if (parse_flat_binary_to_payload(buffer, &output, |
| 1339 | param.loadaddress, |
| 1340 | param.entrypoint, |
| 1341 | param.compression) != 0) { |
| 1342 | return -1; |
| 1343 | } |
| 1344 | buffer_delete(buffer); |
| 1345 | // Direct assign, no dupe. |
| 1346 | memcpy(buffer, &output, sizeof(*buffer)); |
| 1347 | header->len = htobe32(output.size); |
| 1348 | return 0; |
| 1349 | } |
| 1350 | |
| 1351 | static int cbfs_add(void) |
| 1352 | { |
nothing calls this directly
no test coverage detected