New -as mkisofs options --grub2-mbr and --grub2-boot-info
This commit is contained in:
parent
fe245e7131
commit
4bbcfba223
@ -583,7 +583,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
"--old-root-no-md5", "--old-root-devno", "--old-root-no-ino",
|
||||
"--no_rc", "--norock", "-hfsplus", "-fat", "-chrp-boot-part",
|
||||
"-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus",
|
||||
"-isohybrid-apm-hfsplus",
|
||||
"-isohybrid-apm-hfsplus", "--grub2-boot-info",
|
||||
""
|
||||
};
|
||||
static char arg1_options[][41]= {
|
||||
@ -618,7 +618,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
|
||||
"-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl",
|
||||
"-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len",
|
||||
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
|
||||
"-hfsplus-block-size", "-apm-block-size",
|
||||
"-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
|
||||
""
|
||||
};
|
||||
static char arg2_options[][41]= {
|
||||
@ -817,6 +817,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
||||
" -hard-disk-boot Boot image is a hard disk image",
|
||||
" -no-emul-boot Boot image is 'no emulation' image",
|
||||
" -boot-info-table Patch boot image with info table",
|
||||
" --grub2-boot-info Patch boot image at byte 2548",
|
||||
" -eltorito-id ID Set El Torito Id String",
|
||||
" -eltorito-selcrit HEXBYTES Set El Torito Selection Criteria",
|
||||
" -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT",
|
||||
@ -842,6 +843,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
|
||||
" --modification-date=YYYYMMDDhhmmsscc",
|
||||
" Override date of creation and modification",
|
||||
" -isohybrid-mbr FILE Set SYSLINUX mbr/isohdp[fp]x*.bin for isohybrid",
|
||||
" --grub2-mbr FILE Set GRUB2 MBR for patching at byte 432",
|
||||
#ifdef Xorriso_with_isohybriD
|
||||
" isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation",
|
||||
#endif
|
||||
@ -1673,6 +1675,7 @@ not_enough_args:;
|
||||
} else if(strcmp(argpt, "-no-emul-boot")==0 ||
|
||||
strcmp(argpt, "-hard-disk-boot")==0 ||
|
||||
strcmp(argpt, "-boot-info-table")==0 ||
|
||||
strcmp(argpt, "--grub2-boot-info") == 0 ||
|
||||
strncmp(argpt, "isolinux_mbr=", 13)==0 ||
|
||||
strcmp(argpt, "-eltorito-alt-boot")==0 ||
|
||||
strcmp(argpt, "--protective-msdos-label")==0 ||
|
||||
@ -1701,7 +1704,8 @@ not_enough_args:;
|
||||
strcmp(argpt, "-partition_hd_cyl") == 0 ||
|
||||
strcmp(argpt, "-partition_sec_hd") == 0 ||
|
||||
strcmp(argpt, "-partition_cyl_align") == 0 ||
|
||||
strcmp(argpt, "-isohybrid-mbr")==0) {
|
||||
strcmp(argpt, "-isohybrid-mbr") == 0 ||
|
||||
strcmp(argpt, "--grub2-mbr") == 0) {
|
||||
if(i+1>=argc)
|
||||
goto not_enough_args;
|
||||
delay_opt_list[delay_opt_count++]= i;
|
||||
@ -2177,6 +2181,9 @@ problem_handler_2:;
|
||||
xorriso->boot_emul_default= 0;
|
||||
} else if(strcmp(argpt, "-boot-info-table")==0) {
|
||||
xorriso->patch_isolinux_image= (xorriso->patch_isolinux_image & ~2) | 1;
|
||||
} else if(strcmp(argpt, "--grub2-boot-info") == 0) {
|
||||
xorriso->patch_isolinux_image=
|
||||
(xorriso->patch_isolinux_image & ~2) | 512;
|
||||
} else if(strcmp(argpt, "-b") == 0 ||
|
||||
strcmp(argpt, "-eltorito-boot") == 0 ||
|
||||
strcmp(argpt, "--efi-boot") == 0 ||
|
||||
@ -2268,7 +2275,8 @@ problem_handler_2:;
|
||||
} else if(strcmp(argpt, "--embedded-boot")==0 ||
|
||||
strcmp(argpt, "-generic-boot")==0 ||
|
||||
strcmp(argpt, "-G") == 0 ||
|
||||
strcmp(argpt, "-isohybrid-mbr")==0) {
|
||||
strcmp(argpt, "-isohybrid-mbr") == 0 ||
|
||||
strcmp(argpt, "--grub2-mbr") == 0) {
|
||||
if(i+1>=argc)
|
||||
goto not_enough_args;
|
||||
i++;
|
||||
@ -2276,9 +2284,13 @@ problem_handler_2:;
|
||||
if(ret <= 0)
|
||||
goto problem_handler_boot;
|
||||
if(strcmp(argpt, "-isohybrid-mbr")==0)
|
||||
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2;
|
||||
xorriso->system_area_options=
|
||||
(xorriso->system_area_options & ~4001) | 2;
|
||||
else if(strcmp(argpt, "--grub2-mbr") == 0)
|
||||
xorriso->system_area_options=
|
||||
(xorriso->system_area_options & ~2) | 0x4000;
|
||||
} else if(strcmp(argpt, "--protective-msdos-label")==0) {
|
||||
xorriso->system_area_options= (xorriso->system_area_options & ~3) | 1;
|
||||
xorriso->system_area_options= (xorriso->system_area_options & ~2) | 1;
|
||||
} else if(strcmp(argpt, "--boot-catalog-hide")==0) {
|
||||
xorriso->boot_image_cat_hidden|= 3;
|
||||
} else if(strcmp(argpt, "-partition_offset") == 0 ||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2013.04.13.074117"
|
||||
#define Xorriso_timestamP "2013.04.13.074309"
|
||||
|
Loading…
Reference in New Issue
Block a user