Bug fix: Partition cylinder alignment worked only if both, El Torito and

application provided system area data were present.
This commit is contained in:
Thomas Schmitt 2012-06-12 21:21:14 +02:00
parent 6fc3bb6777
commit c166a49889

View File

@ -1570,7 +1570,8 @@ int iso_align_isohybrid(Ecma119Image *t, int flag)
if (img_blocks >= 0x40000000)
{ret = ISO_SUCCESS; goto ex;}
cylsize = 64 * 32 * 512;
} else if ((t->system_area_options & 2) || always_align) {
} else if (t->system_area_options & 2) {
/* Patch externally provided system area as isohybrid MBR */
if (t->catalog == NULL || t->system_area_data == NULL) {
/* isohybrid makes only sense together with ISOLINUX boot image
@ -1580,6 +1581,9 @@ int iso_align_isohybrid(Ecma119Image *t, int flag)
}
cylsize = t->partition_heads_per_cyl * t->partition_secs_per_head
* 512;
} else if (always_align) {
cylsize = t->partition_heads_per_cyl * t->partition_secs_per_head
* 512;
}
if (cylsize == 0)
{ret = ISO_SUCCESS; goto ex;}