New -boot_image bootspecs grub2_mbr= and grub2_boot_info=

This commit is contained in:
2013-04-13 07:42:18 +00:00
parent 45f715408b
commit 37a1673f50
5 changed files with 54 additions and 5 deletions

View File

@ -869,6 +869,14 @@ treatment_patch:;
else
was_ok= 0;
} else if(strncmp(treatpt, "grub2_boot_info=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)
xorriso->patch_isolinux_image= xorriso->patch_isolinux_image & ~512;
else if(strcmp(treatpt + 16, "on") == 0)
xorriso->patch_isolinux_image= xorriso->patch_isolinux_image | 512;
else
was_ok= 0;
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
num= Scanf_io_size(treatpt + 10, 0);
if(num < 512 && isolinux_grub) {
@ -1118,6 +1126,25 @@ treatment_patch:;
#endif /* ! Xorriso_with_isohybriD */
} else if(strncmp(treatpt, "grub2_mbr=", 9) == 0 &&
strcmp(formpt, "grub")==0) {
if(strcmp(treatpt + 9, "off") == 0)
xorriso->system_area_options&= ~0x4000;
else if(strcmp(treatpt + 9, "on") == 0)
xorriso->system_area_options=
(xorriso->system_area_options & ~2) | 0x4000;
else {
sprintf(xorriso->info_text,
"Unrecognized keyword with -boot_image %s %s",
form, treatment);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Allowed with grub2_mbr= are: off , on");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
{ret= 0; goto ex;}
}
} else
was_ok= 0;