Made use of new libisofs isohybrid capability
This commit is contained in:
@ -3635,6 +3635,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||
m->boot_image_emul= 0;
|
||||
m->boot_image_cat_path[0]= 0;
|
||||
m->boot_image_load_size= 4 * 512; /* hearsay out of libisofs/demo/iso.c */
|
||||
m->boot_image_isohybrid= 1;
|
||||
m->allow_graft_points= 0;
|
||||
m->allow_restore= 0;
|
||||
m->do_concat_split= 1;
|
||||
@ -5504,6 +5505,14 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(strcmp(form, "isolinux") == 0) {
|
||||
static char modes[4][6]= {"off", "auto", "on", "force"};
|
||||
is_default= (xorriso->boot_image_isohybrid == 1);
|
||||
sprintf(line,"-boot_image isolinux isohybrid=%s\n",
|
||||
modes[xorriso->boot_image_isohybrid & 3]);
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
|
||||
sprintf(line,"-cd %s\n",
|
||||
(xorriso->wdi[0] ? Text_shellsafe(xorriso->wdi,sfe,0) : "'/'"));
|
||||
@ -10509,7 +10518,7 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
|
||||
xorriso->boot_image_cat_path, 2);
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
|
||||
} else if(strncmp(treatpt, "load_size=", 10) == 0) {
|
||||
num= Scanf_io_size(treatpt + 10, 0);
|
||||
if(num < 512) {
|
||||
sprintf(xorriso->info_text,
|
||||
@ -10519,6 +10528,26 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
|
||||
return(0);
|
||||
}
|
||||
xorriso->boot_image_load_size= num;
|
||||
} else if(strncmp(treatpt, "isohybrid=", 10) == 0) {
|
||||
if(strcmp(treatpt + 10, "off") == 0)
|
||||
xorriso->boot_image_isohybrid= 0;
|
||||
else if(strcmp(treatpt + 10, "auto") == 0)
|
||||
xorriso->boot_image_isohybrid= 1;
|
||||
else if(strcmp(treatpt + 10, "off") == 0)
|
||||
xorriso->boot_image_isohybrid= 2;
|
||||
else if(strcmp(treatpt + 10, "force") == 0)
|
||||
xorriso->boot_image_isohybrid= 3;
|
||||
else {
|
||||
sprintf(xorriso->info_text,
|
||||
"Unrecognized keyword with -boot_image %s %s",
|
||||
form, treatment);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
sprintf(xorriso->info_text,
|
||||
"Allowed with isohybrid= are: off , auto , on , force");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
|
||||
return(0);
|
||||
|
||||
}
|
||||
} else
|
||||
was_ok= 0;
|
||||
} else
|
||||
@ -13847,9 +13876,11 @@ int Xorriso_option_publisher(struct XorrisO *xorriso, char *name, int flag)
|
||||
/* Option -pwd alias -pwdi */
|
||||
int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
char sfe[5 * SfileadrL];
|
||||
|
||||
sprintf(xorriso->info_text,"current working directory in ISO image:\n");
|
||||
Xorriso_info(xorriso,0);
|
||||
sprintf(xorriso->result_line,"%s/\n",xorriso->wdi);
|
||||
sprintf(xorriso->result_line,"%s/\n", Text_shellsafe(xorriso->wdi, sfe, 0));
|
||||
Xorriso_result(xorriso,0);
|
||||
return(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user