New -boot_image bootspecs grub2_mbr= and grub2_boot_info=

This commit is contained in:
2013-04-13 07:42:18 +00:00
parent 92ec54105f
commit fe245e7131
5 changed files with 54 additions and 5 deletions

View File

@ -433,7 +433,14 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
is_default= ((patch_isolinux & 1) == 0 || bin_path[0] == 0 || (flag & 4));
sprintf(line, "-boot_image %s boot_info_table=%s\n",
(patch_isolinux & 2) ? "grub" : form, patch_isolinux ? "on" : "off");
(patch_isolinux & 2) ? "grub" : form,
(patch_isolinux & 1) ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= ((patch_isolinux & 512) == 0 || bin_path[0] == 0 || (flag & 4));
sprintf(line, "-boot_image grub grub2_boot_info=%s\n",
(patch_isolinux & 512) ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
@ -570,6 +577,8 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
if(ret < 0) /* == 0 is normal */
{ret= 0; goto ex;}
/* >>> GRUB2 et.al. : report about system_area_disk_path */
if(xorriso->boot_count == 0 && xorriso->boot_image_bin_path[0] == 0) {
no_image:;
if(xorriso->patch_isolinux_image & 1) {
@ -633,7 +642,7 @@ no_image:;
else
media_type= 0;
ret= Xorriso_boot_item_status(xorriso, xorriso->boot_image_cat_path,
path, platform_id, patch & 1, media_type,
path, platform_id, patch, media_type,
load_size, id_string, sel_crit, "any",
filter, fp, 16 | (flag & 3));
if(ret <= 0)
@ -707,6 +716,8 @@ int Xorriso__append_boot_params(char *line, ElToritoBootImage *bootimg,
" , platform_id=0x%-2.2X ", (unsigned int) platform_id);
if(el_torito_seems_boot_info_table(bootimg, 0))
sprintf(line + strlen(line), " , boot_info_table=on");
if(el_torito_seems_boot_info_table(bootimg, 1))
sprintf(line + strlen(line), " , grub2_boot_info=on");
return(1);
}
@ -1162,6 +1173,8 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block",
"SUN Disk Label"};
/* >>> GRUB2: Take into respect GRUB2 patched MBR */;
old_type= (xorriso->system_area_options & 0xfc) >> 2;
old_options= xorriso->system_area_options & ~0xfc;
if((old_type != 0 || old_options != 0) &&