Bug fix: -boot_image any partition_cyl_align=on prevented further settings

This commit is contained in:
Thomas Schmitt 2014-03-25 19:59:31 +00:00
parent 0297a7bf29
commit 8964a7954d
3 changed files with 11 additions and 8 deletions

View File

@ -1370,26 +1370,27 @@ int Xorriso_set_hppa_boot_parm(struct XorrisO *xorriso, char *text, char *what,
int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
int options, char *cmd, int flag)
{
int old_type, old_options;
int old_type, old_options, new_options;
static char *type_names[4] = {
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block",
"SUN Disk Label"};
old_type= (xorriso->system_area_options & 0xfc) >> 2;
old_options= xorriso->system_area_options & ~0x40fc;
old_options= xorriso->system_area_options & 0x7c03;
new_options= options & 0x7c03;
if((old_type != 0 || old_options != 0) &&
(old_type != sa_type || (old_options != 0 && old_options != options))) {
(old_type != sa_type || (old_options != 0 && old_options != new_options))){
sprintf(xorriso->info_text, "%s : First sector already occupied by %s",
cmd, old_type < 4 ? type_names[old_type] : "other boot facility");
if(old_type == 0 && old_options == 2)
if(old_type == 0 && (old_options & 2))
strcat(xorriso->info_text, " for ISOLINUX isohybrid");
if(old_type == 0 && old_options == 1)
if(old_type == 0 && (old_options & 1))
strcat(xorriso->info_text, " for partition table");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
goto hint_revoke;
}
xorriso->system_area_options= (xorriso->system_area_options & 0x4000) |
((sa_type << 2) & 0xfc) | (options & ~0x40fc);
xorriso->system_area_options= (xorriso->system_area_options & ~0x7cff) |
((sa_type << 2) & 0xfc) | (options & 0x7c03);
if(sa_type == 0)
xorriso->patch_system_area= xorriso->system_area_options;
return(1);

View File

@ -414,6 +414,7 @@ struct XorrisO { /* the global context of xorriso */
0 = auto (align if bit1)
1 = always align
2 = never align
3 = align external partitions
bit10-13= System area sub type
With type 0 = MBR:
Gets overridden by bit0 and bit1.
@ -424,6 +425,7 @@ struct XorrisO { /* the global context of xorriso */
any other feature which
needs to have own MBR
partition entries.
2 = generic MBR
bit14= Only with System area type 0
GRUB2 boot provisions:
Patch system area at byte 92 to

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.03.14.134138"
#define Xorriso_timestamP "2014.03.25.195908"