Avoided to bother libjte if no output paths are given

This commit is contained in:
Thomas Schmitt 2010-11-23 20:04:08 +00:00
parent 5147438506
commit abb2ac7432
5 changed files with 25 additions and 6 deletions

View File

@ -242,6 +242,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->jigdo_params= NULL;
m->jigdo_values= NULL;
m->libjte_params_given= 0;
m->loaded_boot_bin_lba= 0;
m->loaded_boot_cat_path[0]= 0;
m->allow_graft_points= 0;

View File

@ -610,6 +610,7 @@ int Xorriso_jigdo_interpreter(struct XorrisO *xorriso, char *aspect, char *arg,
libjte_destroy(&(xorriso->libjte_handle));
Xorriso_lst_destroy_all(&(xorriso->jigdo_params), 0);
Xorriso_lst_destroy_all(&(xorriso->jigdo_values), 0);
xorriso->libjte_params_given= 0;
return(1);
}
ret= Xorriso_assert_jte_handle(xorriso, 0);
@ -622,9 +623,11 @@ int Xorriso_jigdo_interpreter(struct XorrisO *xorriso, char *aspect, char *arg,
libjte_set_verbose(jte, 1);
/* Direct libjte messages to stderr, rather than message list */
libjte_set_error_behavior(xorriso->libjte_handle, 1, 0);
xorriso->libjte_params_given|= 2;
} else if(strcmp(arg, "off") == 0) {
libjte_set_verbose(jte, 0);
libjte_set_error_behavior(xorriso->libjte_handle, 0, 0);
xorriso->libjte_params_given&= ~2;
} else
goto bad_arg;
} else if(strcmp(aspect, "template_path") == 0 ||
@ -632,52 +635,62 @@ int Xorriso_jigdo_interpreter(struct XorrisO *xorriso, char *aspect, char *arg,
ret= libjte_set_template_path(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 4;
} else if(strcmp(aspect, "jigdo_path") == 0 ||
strcmp(aspect, "-jigdo-jigdo") == 0) {
ret= libjte_set_jigdo_path(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 8;
} else if(strcmp(aspect, "md5_path") == 0 ||
strcmp(aspect, "-md5-list") == 0) {
ret= libjte_set_md5_path(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 16;
} else if(strcmp(aspect, "min_size") == 0 ||
strcmp(aspect, "-jigdo-min-file-size") == 0) {
num= Scanf_io_size(arg, 0);
ret= libjte_set_min_size(jte, num);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 32;
} else if(strcmp(aspect, "checksum_iso") == 0 ||
strcmp(aspect, "-checksum_algorithm_iso") == 0) {
ret= libjte_set_checksum_iso(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 64;
} else if(strcmp(aspect, "checksum_template") == 0 ||
strcmp(aspect, "-checksum_algorithm_template") == 0) {
ret= libjte_set_checksum_template(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 128;
} else if(strcmp(aspect, "compression") == 0 ||
strcmp(aspect, "-jigdo-template-compress") == 0) {
ret= libjte_set_compression(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 256;
} else if(strcmp(aspect, "exclude") == 0 ||
strcmp(aspect, "-jigdo-exclude") == 0) {
ret= libjte_add_exclude(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 512;
} else if(strcmp(aspect, "demand_md5") == 0 ||
strcmp(aspect, "-jigdo-force-md5") == 0) {
ret= libjte_add_md5_demand(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 1024;
} else if(strcmp(aspect, "mapping") == 0 ||
strcmp(aspect, "-jigdo-map") == 0) {
ret= libjte_add_mapping(jte, arg);
if(ret <= 0)
goto jte_failed;
xorriso->libjte_params_given|= 2048;
} else {
sprintf(xorriso->info_text, "-jigdo: unknown aspect '%s'", aspect);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);

View File

@ -769,14 +769,14 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
xorriso->vol_uuid);
#ifdef Xorriso_with_libjtE
if(xorriso->libjte_handle) {
if(xorriso->libjte_handle && (xorriso->libjte_params_given & (4 | 8))) {
/* >>> Check whether the mandatory parameters are set */;
ret= libjte_set_outfile(xorriso->libjte_handle, xorriso->outdev);
Xorriso_process_msg_queues(xorriso, 0);
if(ret <= 0)
goto ex;
/* >>> Check whether the mandatory parameters are set */;
isoburn_igopt_attach_jte(sopts, xorriso->libjte_handle);
/* Padding to be done by libisofs, not by libburn */

View File

@ -359,7 +359,12 @@ struct XorrisO { /* the global context of xorriso */
/* List of -jigdo parameters since the most recent -jigdo clear */
struct Xorriso_lsT *jigdo_params;
struct Xorriso_lsT *jigdo_values;
int libjte_params_given; /* bits: 0= outfile , 1= verbosity , 2= template_path
3= jigdo_path , 4= md5_path , 5= min_size
6= checksum_iso , 7= checksum_template
8= compression , 9= exclude , 10= demand_md5
11= mapping
*/
/* LBA of boot image after image loading */
int loaded_boot_bin_lba;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.11.23.193708"
#define Xorriso_timestamP "2010.11.23.200346"