Improved size estimation when loading ISO with hidden El Torito images
This commit is contained in:
parent
7ea6d4ebcb
commit
585a54d020
@ -4684,8 +4684,10 @@ static
|
||||
int iso_impsysa_reduce_next_above(IsoImage *image, uint32_t block,
|
||||
uint32_t *next_above, int flag)
|
||||
{
|
||||
int i;
|
||||
int i, section_count, ret;
|
||||
struct iso_imported_sys_area *sai;
|
||||
struct el_torito_boot_image *img;
|
||||
struct iso_file_section *sections = NULL;
|
||||
|
||||
sai = image->imported_sa_info;
|
||||
|
||||
@ -4721,6 +4723,17 @@ int iso_impsysa_reduce_next_above(IsoImage *image, uint32_t block,
|
||||
if (image->bootcat->node != NULL)
|
||||
iso_impsysa_reduce_na(block, next_above, image->bootcat->node->lba);
|
||||
|
||||
for (i= 0; i < image->bootcat->num_bootimages; i++) {
|
||||
img = image->bootcat->bootimages[i];
|
||||
ret = iso_file_get_old_image_sections(img->image, §ion_count,
|
||||
§ions, 0);
|
||||
if (ret > 0 && section_count > 0)
|
||||
if (block != sections[0].block)
|
||||
iso_impsysa_reduce_na(block, next_above, sections[0].block);
|
||||
if (sections != NULL)
|
||||
free(sections);
|
||||
}
|
||||
|
||||
iso_impsysa_reduce_na(block, next_above, sai->image_size);
|
||||
|
||||
return ISO_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user