* Calculate size and offset of each sub-partition again since it might have * changed because of add/delete operation. Also, re-create BPDT and S-BPDT * entries and write back the new IFWI image to file. */
| 1273 | * entries and write back the new IFWI image to file. |
| 1274 | */ |
| 1275 | static void ifwi_repack(void) |
| 1276 | { |
| 1277 | bpdt_reset(); |
| 1278 | bpdt_entries_init_header_order(); |
| 1279 | bpdt_entries_init_pack_order(); |
| 1280 | |
| 1281 | struct bpdt *b = buffer_get(&ifwi_image.bpdt); |
| 1282 | bpdt_print_entries(&b->e[0], b->h.descriptor_count, "BPDT"); |
| 1283 | |
| 1284 | b = buffer_get(&ifwi_image.subpart_buf[S_BPDT_TYPE]); |
| 1285 | bpdt_print_entries(&b->e[0], b->h.descriptor_count, "S-BPDT"); |
| 1286 | |
| 1287 | DEBUG("Repack done.. writing image.\n"); |
| 1288 | ifwi_write(param.image_name); |
| 1289 | } |
| 1290 | |
| 1291 | static void init_subpart_dir_header(struct subpart_dir_header *hdr, |
| 1292 | size_t count, const char *name) |
no test coverage detected