Enabled -status -jigdo

master
Thomas Schmitt 13 years ago
parent 54a493f382
commit daebb44722

@ -640,6 +640,16 @@ int Xorriso_lst_detach_text(struct Xorriso_lsT *entry, int flag)
}
int Xorriso_lst_get_last(struct Xorriso_lsT *entry, struct Xorriso_lsT **last,
int flag)
{
*last= NULL;
if(entry != NULL)
for((*last)= entry; (*last)->next != NULL; (*last)= (*last)->next);
return(1);
}
/* --------------------------- End Xorriso_lsT ---------------------------- */

@ -130,6 +130,8 @@ char *Xorriso_lst_get_text(struct Xorriso_lsT *entry, int flag);
int Xorriso_lst_detach_text(struct Xorriso_lsT *entry, int flag);
int Xorriso_lst_get_last(struct Xorriso_lsT *entry, struct Xorriso_lsT **last,
int flag);
int Exclusions_new(struct ExclusionS **o, int flag);

@ -223,6 +223,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
#ifdef Xorriso_with_libjtE
m->libjte_handle= NULL;
m->jigdo_params= NULL;
m->jigdo_values= NULL;
#endif
m->loaded_boot_bin_lba= 0;
@ -430,6 +432,8 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag)
#ifdef Xorriso_with_libjtE
if(m->libjte_handle)
libjte_destroy(&(m->libjte_handle));
Xorriso_lst_destroy_all(&(m->jigdo_params), 0);
Xorriso_lst_destroy_all(&(m->jigdo_values), 0);
#endif
Xorriso_detach_libraries(m, flag&1);

@ -555,6 +555,8 @@ int Xorriso_jigdo_interpreter(struct XorrisO *xorriso, char *aspect, char *arg,
if(strcmp(aspect, "clear") == 0) {
if(xorriso->libjte_handle != NULL)
libjte_destroy(&(xorriso->libjte_handle));
Xorriso_lst_destroy_all(&(xorriso->jigdo_params), 0);
Xorriso_lst_destroy_all(&(xorriso->jigdo_values), 0);
return(1);
}
ret= Xorriso_assert_jte_handle(xorriso, 0);
@ -622,6 +624,17 @@ int Xorriso_jigdo_interpreter(struct XorrisO *xorriso, char *aspect, char *arg,
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
ret= Xorriso_lst_new(&(xorriso->jigdo_params), aspect, xorriso->jigdo_params,
1);
if(ret > 0)
ret= Xorriso_lst_new(&(xorriso->jigdo_values), arg, xorriso->jigdo_values,
1);
if(ret <= 0) {
Xorriso_no_malloc_memory(xorriso, NULL, 0);
return(-1);
}
return(1);
bad_arg:

@ -1091,7 +1091,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
static char channel_prefixes[4][4]= {".","R","I","M"};
static char load_names[][20]= {"auto", "session", "track", "lba", "volid"};
static int max_load_mode= 4;
struct Xorriso_lsT *paths, *leafs, *s;
struct Xorriso_lsT *paths, *leafs, *s, *plst, *vlst;
no_defaults= flag&1;
line= xorriso->result_line;
@ -1484,6 +1484,22 @@ 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);
Xorriso_lst_get_last(xorriso->jigdo_params, &plst, 0);
Xorriso_lst_get_last(xorriso->jigdo_values, &vlst, 0);
if(plst == NULL || vlst == NULL) {
is_default= 1;
sprintf(line,"-jigdo clear 'all'\n");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso, filter, fp, flag & 2);
}
while(plst != NULL && vlst != NULL) {
sprintf(line,"-jigdo %s %s\n", Xorriso_lst_get_text(plst, 0),
Text_shellsafe(Xorriso_lst_get_text(vlst, 0), sfe, 0));
Xorriso_status_result(xorriso, filter, fp, flag & 2);
plst= Xorriso_lst_get_prev(plst, 0);
vlst= Xorriso_lst_get_prev(vlst, 0);
}
if(xorriso->do_global_uid) {
sprintf(line,"-uid %lu\n", (unsigned long) xorriso->global_uid);
Xorriso_status_result(xorriso,filter,fp,flag&2);

@ -329,6 +329,11 @@ struct XorrisO { /* the global context of xorriso */
#ifdef Xorriso_with_libjtE
/* Parameters and state of Jigdo Template Export environment */
struct libjte_env *libjte_handle;
/* List of -jigdo parameters since the most recent -jigdo clear */
struct Xorriso_lsT *jigdo_params;
struct Xorriso_lsT *jigdo_values;
#endif
/* LBA of boot image after image loading */

@ -1 +1 @@
#define Xorriso_timestamP "2010.09.29.152827"
#define Xorriso_timestamP "2010.09.29.164121"

Loading…
Cancel
Save