|
|
|
@ -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);
|
|
|
|
|