| 482 | } |
| 483 | |
| 484 | static void bpdt_print_entries(struct bpdt_entry *e, size_t count, |
| 485 | const char *name) |
| 486 | { |
| 487 | if (verbose == 0) |
| 488 | return; |
| 489 | |
| 490 | printf("%s entries\n", name); |
| 491 | |
| 492 | printf("%-25s%-25s%-25s%-25s%-25s%-25s%-25s%-25s\n", "Entry #", |
| 493 | "Sub-Partition", "Name", "Type", "Flags", "Offset", "Size", |
| 494 | "File Offset"); |
| 495 | |
| 496 | printf("==============================================================" |
| 497 | "==============================================================" |
| 498 | "==============================================================" |
| 499 | "===============\n"); |
| 500 | |
| 501 | |
| 502 | size_t i; |
| 503 | for (i = 0; i < count; i++) { |
| 504 | printf("%-25zd%-25s%-25s%-25d0x%-23.08x0x%-23x0x%-23x0x%-23zx" |
| 505 | "\n", i+1, subparts[e[i].type].name, |
| 506 | subparts[e[i].type].readable_name, e[i].type, e[i].flags, |
| 507 | e[i].offset, e[i].size, |
| 508 | e[i].offset + ifwi_image.input_ifwi_start_offset); |
| 509 | } |
| 510 | |
| 511 | printf("==============================================================" |
| 512 | "==============================================================" |
| 513 | "==============================================================" |
| 514 | "===============\n"); |
| 515 | |
| 516 | } |
| 517 | |
| 518 | static void bpdt_validate_header(struct bpdt_header *h, const char *name) |
| 519 | { |
no test coverage detected