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

@ -752,6 +752,8 @@ int Xorriso_genisofs_add_boot(struct XorrisO *xorriso, int flag)
{
int ret;
if(xorriso->boot_img_size_default && xorriso->boot_image_emul == 0)
xorriso->boot_img_full_size= 1;
ret= Xorriso_attach_boot_image(xorriso, 0);
if(ret <= 0)
xorriso->boot_image_bin_path[0]= 0;
@ -2445,8 +2447,13 @@ problem_handler_2:;
if(i+1>=argc)
goto not_enough_args;
i++;
sscanf(argv[i], "%d", &ret);
xorriso->boot_image_load_size= ret * 512;
if(strcmp(argv[i], "full") == 0) {
xorriso->boot_img_full_size= 1;
} else {
sscanf(argv[i], "%d", &ret);
xorriso->boot_image_load_size= ret * 512;
}
xorriso->boot_img_size_default= 0;
} else if(strcmp(argpt, "-eltorito-id") == 0 ||
strcmp(argpt, "-eltorito-selcrit") == 0) {
if(i+1>=argc)
@ -2624,6 +2631,11 @@ problem_handler_boot:;
was_failure= 1;
}
/* Enforce the -boot-load-size default of mkisofs */
if(with_boot_image && xorriso->boot_img_size_default &&
xorriso->boot_image_emul == 0)
xorriso->boot_img_full_size= 1;
if(xorriso->no_emul_toc & 1)
xorriso->do_padding_by_libisofs= 1;