Bug fix: -as mkisofs -no-emul-boot without -boot-load-size defaulted to size 4
This commit is contained in:
@ -813,6 +813,7 @@ treatment_patch:;
|
||||
strcat(xorriso->boot_image_bin_path, "isolinux.bin");
|
||||
strcat(xorriso->boot_image_cat_path, "boot.cat");
|
||||
xorriso->boot_image_load_size= 4 * 512;
|
||||
xorriso->boot_img_size_default= 0;
|
||||
xorriso->keep_boot_image= 0;
|
||||
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
|
||||
strcpy(xorriso->boot_image_bin_form, formpt);
|
||||
@ -843,8 +844,10 @@ treatment_patch:;
|
||||
xorriso->keep_boot_image= 0;
|
||||
if(isolinux_grub) {
|
||||
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~3) | 1;
|
||||
if(xorriso->boot_image_bin_path[0])
|
||||
if(xorriso->boot_image_bin_path[0]) {
|
||||
xorriso->boot_image_load_size= 4 * 512;
|
||||
xorriso->boot_img_size_default= 0;
|
||||
}
|
||||
strcpy(xorriso->boot_image_bin_form, formpt);
|
||||
} else
|
||||
strcpy(xorriso->boot_image_bin_form, "any");
|
||||
@ -968,15 +971,20 @@ treatment_patch:;
|
||||
was_ok= 0;
|
||||
|
||||
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
|
||||
num= Scanf_io_size(treatpt + 10, 0);
|
||||
if(num < 512 && isolinux_grub) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-boot_image %s : load_size too small (%s < 512)",
|
||||
formpt, treatpt + 10);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
if(strcmp(treatpt + 10, "full") == 0) {
|
||||
xorriso->boot_img_full_size= 1;
|
||||
} else {
|
||||
num= Scanf_io_size(treatpt + 10, 0);
|
||||
if(num < 512 && isolinux_grub) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-boot_image %s : load_size too small (%s < 512)",
|
||||
formpt, treatpt + 10);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
xorriso->boot_image_load_size= num;
|
||||
}
|
||||
xorriso->boot_image_load_size= num;
|
||||
xorriso->boot_img_size_default= 0;
|
||||
|
||||
} else if(strncmp(treatpt, "id_string=", 10) == 0) {
|
||||
memset(xorriso->boot_id_string, 0, 29);
|
||||
|
Reference in New Issue
Block a user