From 3a607200996dfd1e6802cf46f244a1a454a63998 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Jun 2012 21:58:55 +0200 Subject: [PATCH] Correcterd criterion for enabling CHRP partition entry. --- libisofs/ecma119.c | 3 +++ libisofs/system_area.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libisofs/ecma119.c b/libisofs/ecma119.c index b33793f..7f94b3b 100644 --- a/libisofs/ecma119.c +++ b/libisofs/ecma119.c @@ -2082,6 +2082,9 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img) goto target_cleanup; #endif /* ! Libisofs_gpt_writer_lasT */ + + /* >>> Should not the checksum writer come before the zero writer ? */ + /* IMPORTANT: This must be the last writer before the checksum writer */ ret = zero_writer_create(target, target->tail_blocks, 1); if (ret < 0) diff --git a/libisofs/system_area.c b/libisofs/system_area.c index d270c16..3612a25 100644 --- a/libisofs/system_area.c +++ b/libisofs/system_area.c @@ -2030,8 +2030,7 @@ static int partprepend_writer_compute_data_blocks(IsoImageWriter *writer) t->curblock += t->efi_boot_part_size; } - if ((((t->system_area_options >> 10) & 0xf) == 1) && - ((t->system_area_options >> 2) & 0x3f) == 0) { + if ((t->system_area_options & 0x3cff) == 0x0400) { /* CHRP is not compatible with any other partition in MBR */ if (t->prep_partition != NULL || t->fat || will_have_gpt || t->mbr_req_count > 0)