Parse the bpdt entries to compute the size of the BPDT */
| 846 | |
| 847 | /* Parse the bpdt entries to compute the size of the BPDT */ |
| 848 | static size_t bpdt_size(void *data) |
| 849 | { |
| 850 | struct bpdt *b = (struct bpdt *)data; |
| 851 | size_t i, size = 0; |
| 852 | |
| 853 | for (i = 0; i < b->h.descriptor_count; i++) |
| 854 | size = MAX(size, b->e[i].offset + b->e[i].size); |
| 855 | |
| 856 | return size; |
| 857 | } |
| 858 | |
| 859 | /* Parse input image file to identify different sub-partitions. */ |
| 860 | static int ifwi_parse(void) |