New -boot_image bootspec iso_mbr_part_type=

This commit is contained in:
2017-02-27 10:38:16 +01:00
parent f3b8515366
commit 3a41524e63
10 changed files with 132 additions and 68 deletions

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -1095,6 +1095,26 @@ treatment_patch:;
else
was_ok= 0;
} else if(strncmp(treatpt, "iso_mbr_part_type=", 18) == 0) {
ret= 256;
if(strncmp(treatpt + 18, "default", 2) == 0) {
ret= -1;
} else if(strncmp(treatpt + 18, "0x", 2) == 0) {
u= 256;
sscanf(treatpt + 20, "%x", &u);
ret= u;
} else {
sscanf(treatpt + 18, "%d", &ret);
}
if(ret < -1 || ret > 0xff) {
sprintf(xorriso->info_text,
"-boot_image %s : iso_mbr_part_type='%s' wrong (\"default\", 0 ... 255, 0x00 ... 0xff)",
formpt, treatpt + 18);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
xorriso->iso_mbr_part_type= ret;
} else if(strncmp(treatpt, "partition_hd_cyl=", 17)==0) {
u= 0;
sscanf(treatpt + 17, "%u", &u);