New -as mkisofs options --gpt-iso-bootable and --gpt-iso-not-ro

This commit is contained in:
2021-05-25 21:22:43 +02:00
parent db5d4eb867
commit 23d0d8e90a
5 changed files with 123 additions and 69 deletions

View File

@ -636,6 +636,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv,
"-isohybrid-gpt-basdat", "-isohybrid-gpt-hfsplus",
"-isohybrid-apm-hfsplus", "--grub2-boot-info", "-joliet-utf16",
"-appended_part_as_gpt", "-appended_part_as_apm", "--mbr-force-bootable",
"--gpt-iso-bootable", "--gpt-iso-not-ro",
"-part_like_isohybrid", "--zisofs-version-2", "--zisofs2-susp-z2",
"--zisofs2-susp-zf",
""
@ -906,6 +907,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" --embedded-boot FILE Alias of -G",
" --protective-msdos-label Patch System Area by partition table",
" --mbr-force-bootable Enforce existence of bootable flag in MBR",
" --gpt-iso-bootable Set Legacy BIOS bootable flag in ISO partition",
" --gpt-iso-not-ro Do not set Read-only flag in ISO partition",
" -partition_offset LBA Make image mountable by first partition, too",
" -partition_sec_hd NUMBER Define number of sectors per head",
" -partition_hd_cyl NUMBER Define number of heads per cylinder",
@ -1960,6 +1963,8 @@ not_enough_args:;
strcmp(argpt, "-eltorito-alt-boot")==0 ||
strcmp(argpt, "--protective-msdos-label")==0 ||
strcmp(argpt, "--mbr-force-bootable")==0 ||
strcmp(argpt, "--gpt-iso-bootable")==0 ||
strcmp(argpt, "--gpt-iso-not-ro")==0 ||
strcmp(argpt, "--boot-catalog-hide")==0 ||
strcmp(argpt, "-isohybrid-gpt-basdat")==0 ||
strcmp(argpt, "-isohybrid-gpt-hfsplus")==0 ||
@ -2653,6 +2658,12 @@ problem_handler_2:;
} else if(strcmp(argpt, "--mbr-force-bootable") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 15);
} else if(strcmp(argpt, "--gpt-iso-bootable") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 16);
} else if(strcmp(argpt, "--gpt-iso-not-ro") == 0) {
xorriso->system_area_options= xorriso->system_area_options | (1 << 17);
} else if(strcmp(argpt, "--boot-catalog-hide")==0) {
xorriso->boot_image_cat_hidden|= 3;
} else if(strcmp(argpt, "-partition_offset") == 0 ||