From 23e26479208e27031a1d9a3a7e23f0e093767641 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 25 Nov 2008 16:32:55 +0100 Subject: [PATCH] Described need to pad isohybrid to full MB. Removed compiler warning about isohybrid FIXME. --- libisofs/libisofs.h | 16 +++++++++------- libisofs/system_area.c | 6 ++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index d2be2de..564f091 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -1935,14 +1935,16 @@ void el_torito_patch_isolinux_image(ElToritoBootImage *bootimg); * bitmask style flag. The following values are defined: * * bit 0 -> 1 to path the image, 0 to not - * Patching the image involves the writting of a 56 bytes + * Patching the image involves the writing of a 56 bytes * boot information table at offset 8 of the boot image file. - * The original boot image file won't be modified. This is needed - * to allow isolinux images to be bootable. - * bit 1 -> 1 to generate an hybrid image, 0 to not - * An hybrid image is a boot image that boots from either CD/DVD - * media or from USB sticks. For that, you should use an isolinux - * image that supports hybrid mode. Recent images support this. + * The original boot image file will not be modified. This is + * needed to allow isolinux images to be bootable. + * bit 1 -> 1 to generate an hybrid image with MBR, 0 to not + * An hybrid image is a boot image that boots from either + * CD/DVD media or from disk-like media, e.g. USB stick. + * For that you need isolinux.bin from SYSLINUX 3.72 or later. + * IMPORTANT: The application has to take care that the image + * on media gets padded up to the next full MB. * @param flag * Reserved for future usage, set to 0. * @return diff --git a/libisofs/system_area.c b/libisofs/system_area.c index 503a066..b96f472 100644 --- a/libisofs/system_area.c +++ b/libisofs/system_area.c @@ -48,7 +48,13 @@ int iso_write_system_area(Ecma119Image *t, uint8_t *buf) img_blocks = t->curblock; ret = make_isohybrid_mbr(t->bootimg->sections[0].block, &img_blocks, (char*)buf, 0); +/* + API description of el_torito_set_isolinux_options() prescribes + to pad to full MB. + So this is not urgent any more : + // FIXME the new img_blocks size should be taken into account +*/ if (ret != 1) { /* error, it should never happen */