From 18ab6019bc7d4ce9832a2f6aaffd6d39109e4755 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 2 Jul 2017 15:11:20 +0200 Subject: [PATCH] Let ISO size cover appended partitions if --protective-msdos-label or nonzero -partition_offset is given --- libisofs/eltorito.c | 12 ------------ libisofs/system_area.c | 8 ++++++++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/libisofs/eltorito.c b/libisofs/eltorito.c index b4ed22a..ba220b0 100644 --- a/libisofs/eltorito.c +++ b/libisofs/eltorito.c @@ -1505,18 +1505,6 @@ int eltorito_writer_create(Ecma119Image *target) target->catalog->bootimages[idx]->appended_start; target->boot_intvl_size[idx] = target->catalog->bootimages[idx]->appended_size; - - /* >>> ??? Why only with appended partition as El Torito image ? - Can this be used in all cases of appended partitions ? - */ - if ((((target->system_area_options >> 2) & 0x3f) == 0 && - (target->system_area_options & 3) == 1) || - target->opts->partition_offset > 0) { - /* Protective MBR || partition offset */ - /* ISO will not be a partition. It can span the whole image. */ - target->pvd_size_is_total_size = 1; - } - continue; } diff --git a/libisofs/system_area.c b/libisofs/system_area.c index 8e4681b..a486685 100644 --- a/libisofs/system_area.c +++ b/libisofs/system_area.c @@ -2153,6 +2153,14 @@ int iso_write_system_area(Ecma119Image *t, uint8_t *buf) } } + if ((((t->system_area_options >> 2) & 0x3f) == 0 && + (t->system_area_options & 3) == 1) || + t->opts->partition_offset > 0) { + /* Protective MBR || partition offset */ + /* ISO will not be a partition. It can span the whole image. */ + t->pvd_size_is_total_size = 1; + } + return ISO_SUCCESS; }