Bug fix: -as mkisofs -no-emul-boot without -boot-load-size defaulted to size 4

This commit is contained in:
2016-11-13 11:13:33 +01:00
parent 76ac0d87a8
commit 8adbb1de7e
13 changed files with 194 additions and 129 deletions

View File

@ -753,8 +753,14 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
}
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
}
/* The function will understand negative short as positive unsigned */
el_torito_set_load_size(bootimg, (short) (load_size / 512));
if(xorriso->boot_img_full_size) {
el_torito_set_full_load(bootimg, 1);
} else {
/* The function will understand negative short as positive unsigned */
el_torito_set_load_size(bootimg, (short) (load_size / 512));
}
el_torito_set_id_string(bootimg, xorriso->boot_id_string);
el_torito_set_selection_crit(bootimg, xorriso->boot_selection_crit);
ret= Xorriso_set_isolinux_options(xorriso, image, 1);
@ -768,6 +774,8 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
xorriso->boot_image_emul= 0;
xorriso->boot_emul_default= 1;
xorriso->boot_image_load_size= 4 * 512;
xorriso->boot_img_size_default= 1;
xorriso->boot_img_full_size= 0;
memset(xorriso->boot_id_string, 0, sizeof(xorriso->boot_id_string));
memset(xorriso->boot_selection_crit, 0,
sizeof(xorriso->boot_selection_crit));