New bootspec sparc_label=, new -as mkisofs options -sparc-boot , -sparc-label
This commit is contained in:
@ -459,8 +459,8 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
bit0= do only report non-default settings
|
||||
bit1= do only report to fp
|
||||
*/
|
||||
int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
|
||||
char *filter, FILE *fp, int flag)
|
||||
int Xorriso_boot_status_non_mbr(struct XorrisO *xorriso, IsoImage *image,
|
||||
char *filter, FILE *fp, int flag)
|
||||
{
|
||||
int i, num_boots, sa_type;
|
||||
char *paths[15], *line;
|
||||
@ -468,6 +468,15 @@ int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
|
||||
line= xorriso->result_line;
|
||||
|
||||
sa_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||
if(sa_type == 3) {
|
||||
sprintf(line, "-boot_image any sparc_label=");
|
||||
Text_shellsafe(xorriso->ascii_disc_label, line, 1);
|
||||
strcat(line, "\n");
|
||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||
return(0);
|
||||
}
|
||||
if(sa_type != 1 && sa_type != 2)
|
||||
return(0);
|
||||
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
if(num_boots <= 0)
|
||||
@ -493,8 +502,8 @@ int Xorriso_append_part_status(struct XorrisO *xorriso, IsoImage *image,
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i= 0; i < 4; i++) {
|
||||
if(xorriso->appended_partitions[i][0] == 0)
|
||||
for(i= 0; i < Xorriso_max_appended_partitionS; i++) {
|
||||
if(xorriso->appended_partitions[i] == NULL)
|
||||
continue;
|
||||
sprintf(xorriso->result_line, "-append_partition %d 0x%2.2x ",
|
||||
i + 1, (unsigned int) xorriso->appended_part_types[i]);
|
||||
@ -537,7 +546,7 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
if(image == NULL)
|
||||
goto no_image;
|
||||
|
||||
ret= Xorriso_boot_status_mips(xorriso, image, filter, fp, flag & 3);
|
||||
ret= Xorriso_boot_status_non_mbr(xorriso, image, filter, fp, flag & 3);
|
||||
if(ret < 0) /* == 0 is normal */
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
@ -1080,15 +1089,16 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
||||
int options, char *cmd, int flag)
|
||||
{
|
||||
int old_type, old_options;
|
||||
static char *type_names[3] = {
|
||||
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block"};
|
||||
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 & ~0xfc;
|
||||
if((old_type != 0 || old_options != 0) &&
|
||||
(old_type != sa_type || (old_options != 0 && old_options != options))) {
|
||||
sprintf(xorriso->info_text, "%s : First sector already occupied by %s",
|
||||
cmd, old_type < 2 ? type_names[old_type] : "other boot facility");
|
||||
cmd, old_type < 4 ? type_names[old_type] : "other boot facility");
|
||||
if(old_type == 0 && old_options == 2)
|
||||
strcat(xorriso->info_text, " for ISOLINUX isohybrid");
|
||||
if(old_type == 0 && old_options == 1)
|
||||
@ -1106,7 +1116,9 @@ hint_revoke:;
|
||||
sprintf(xorriso->info_text, "Revokable by -boot_image any discard");
|
||||
else if(old_type == 1 || old_type == 2)
|
||||
sprintf(xorriso->info_text, "Revokable by -boot_image any mips_discard");
|
||||
if(old_type < 2)
|
||||
else if(old_type == 3)
|
||||
sprintf(xorriso->info_text, "Revokable by -boot_image any sparc_discard");
|
||||
if(old_type < 4)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||
return(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user