-boot_image mipsel_path= , -as mkisofs -mipsel-boot.
This commit is contained in:
@ -458,17 +458,20 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
int Xorriso_boot_status_mips(struct XorrisO *xorriso, IsoImage *image,
|
||||
char *filter, FILE *fp, int flag)
|
||||
{
|
||||
int i, num_boots;
|
||||
int i, num_boots, sa_type;
|
||||
char *paths[15], *line;
|
||||
|
||||
line= xorriso->result_line;
|
||||
|
||||
sa_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||
num_boots= iso_image_get_mips_boot_files(image, paths, 0);
|
||||
Xorriso_process_msg_queues(xorriso, 0);
|
||||
if(num_boots <= 0)
|
||||
return(num_boots);
|
||||
if(sa_type == 2)
|
||||
num_boots= 1;
|
||||
for(i= 0; i < num_boots; i++) {
|
||||
strcpy(line,"-boot_image any mips_path=");
|
||||
sprintf(line, "-boot_image any mips%s_path=", sa_type ==2 ? "el" : "");
|
||||
Text_shellsafe(paths[i], line, 1);
|
||||
strcat(line, "\n");
|
||||
Xorriso_status_result(xorriso, filter, fp, flag & 2);
|
||||
@ -1001,22 +1004,38 @@ ex:;
|
||||
|
||||
|
||||
/* @param flag bit0= give up all boot file paths
|
||||
bit1= refuse if already a path is added
|
||||
*/
|
||||
int Xorriso_add_mips_boot_file(struct XorrisO *xorriso, char *path, int flag)
|
||||
{
|
||||
int ret;
|
||||
IsoImage *image;
|
||||
char *paths[15];
|
||||
|
||||
ret= Xorriso_get_volume(xorriso, &image, 0);
|
||||
if(ret <= 0)
|
||||
return ret;
|
||||
if(flag & 1) {
|
||||
iso_image_give_up_mips_boot(image, 0);
|
||||
return(1);
|
||||
iso_image_give_up_mips_boot(image, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
return(1);
|
||||
}
|
||||
if(flag & 2) {
|
||||
ret= iso_image_get_mips_boot_files(image, paths, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(ret < 0)
|
||||
goto report_error;
|
||||
if(ret > 0) {
|
||||
Xorriso_msgs_submit(xorriso, 0,
|
||||
"There is already a boot image file registered.",
|
||||
0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
ret = iso_image_add_mips_boot_file(image, path, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if (ret < 0) {
|
||||
report_error:;
|
||||
Xorriso_report_iso_error(xorriso, "", ret,
|
||||
"Error when adding MIPS boot file",
|
||||
0, "FAILURE", 1);
|
||||
@ -1030,7 +1049,8 @@ 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[2] = {"MBR", "MIPS Big Endian Volume Header"};
|
||||
static char *type_names[3] = {
|
||||
"MBR", "MIPS Big Endian Volume Header", "MIPS Little Endian Boot Block"};
|
||||
|
||||
old_type= (xorriso->system_area_options & 0xfc) >> 2;
|
||||
old_options= xorriso->system_area_options & ~0xfc;
|
||||
@ -1053,7 +1073,7 @@ int Xorriso_coordinate_system_area(struct XorrisO *xorriso, int sa_type,
|
||||
hint_revoke:;
|
||||
if(old_type == 0)
|
||||
sprintf(xorriso->info_text, "Revokable by -boot_image any discard");
|
||||
else if(old_type == 1)
|
||||
else if(old_type == 1 || old_type == 2)
|
||||
sprintf(xorriso->info_text, "Revokable by -boot_image any mips_discard");
|
||||
if(old_type < 2)
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||
|
Reference in New Issue
Block a user