|
|
|
@ -2805,6 +2805,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
|
|
|
|
if(getcwd(m->initial_wdx,sizeof(m->initial_wdx)-1)==NULL)
|
|
|
|
|
m->initial_wdx[0]= 0;
|
|
|
|
|
m->no_rc= 0;
|
|
|
|
|
m->permanent_emulation= 0;
|
|
|
|
|
|
|
|
|
|
m->rc_filename_count= Xorriso_rc_nuM;
|
|
|
|
|
for(i=0;i<m->rc_filename_count-1;i++)
|
|
|
|
@ -2932,6 +2933,11 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
|
|
|
|
goto failure;
|
|
|
|
|
if(strcmp(leafname, "osirrox")==0)
|
|
|
|
|
m->allow_restore= 1;
|
|
|
|
|
else if(strcmp(leafname, "xorrisofs")==0 || strcmp(leafname, "genisofs")==0 ||
|
|
|
|
|
strcmp(leafname, "mkisofs")==0 || strcmp(leafname, "genisoimage")==0) {
|
|
|
|
|
m->permanent_emulation= -1; /* becomeis +1 before argument interpretation */
|
|
|
|
|
Xorriso_protect_stdout(*xorriso, 0);
|
|
|
|
|
}
|
|
|
|
|
ret= Exclusions_new(&(m->disk_exclusions), 0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
goto failure;
|
|
|
|
@ -7509,7 +7515,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
adr[0]= indev[0]= 0;
|
|
|
|
|
adr[0]= indev[0]= msc[0]= 0;
|
|
|
|
|
for(i= 0; i<argc; i++) {
|
|
|
|
|
if(strcmp(argv[i], "-version")==0) {
|
|
|
|
|
sprintf(xorriso->result_line,
|
|
|
|
@ -7779,6 +7785,22 @@ ex:;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int Xorriso_as_genisofs(struct XorrisO *xorriso, int argc, char **argv,
|
|
|
|
|
int *idx, int flag)
|
|
|
|
|
{
|
|
|
|
|
int end_idx, ret, idx_count, old_idx;
|
|
|
|
|
|
|
|
|
|
old_idx= *idx;
|
|
|
|
|
end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, 1);
|
|
|
|
|
(*idx)= end_idx;
|
|
|
|
|
idx_count= end_idx-old_idx;
|
|
|
|
|
if(end_idx<=0 || old_idx>=argc)
|
|
|
|
|
return(1);
|
|
|
|
|
ret= Xorriso_genisofs(xorriso, "genisofs", end_idx-old_idx, argv+old_idx, 0);
|
|
|
|
|
return(ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* @param boss_iter Opaque handle to be forwarded to actions in ISO image
|
|
|
|
|
Set to NULL if calling this function from outside ISO world
|
|
|
|
|
@param flag bit2= -follow: this is not a command parameter
|
|
|
|
@ -8302,7 +8324,8 @@ int Xorriso_option_as(struct XorrisO *xorriso, int argc, char **argv,
|
|
|
|
|
goto ex;
|
|
|
|
|
} else if(strcmp(argv[*idx], "mkisofs")==0 ||
|
|
|
|
|
strcmp(argv[*idx], "genisoimage")==0 ||
|
|
|
|
|
strcmp(argv[*idx], "genisofs")==0) {
|
|
|
|
|
strcmp(argv[*idx], "genisofs")==0 ||
|
|
|
|
|
strcmp(argv[*idx], "xorrisofs")==0) {
|
|
|
|
|
ret= Xorriso_genisofs(xorriso, argv[*idx], end_idx-(*idx)-1, argv+(*idx)+1,
|
|
|
|
|
0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
@ -12176,6 +12199,16 @@ return:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
next_command:;
|
|
|
|
|
if(xorriso->permanent_emulation==1) {
|
|
|
|
|
ret= Xorriso_as_genisofs(xorriso, argc, argv, idx, 0);
|
|
|
|
|
if(ret<=0)
|
|
|
|
|
goto eval_any_problems;
|
|
|
|
|
if((*idx)<argc)
|
|
|
|
|
xorriso->permanent_emulation= 0;
|
|
|
|
|
else
|
|
|
|
|
{ret= 1; goto ex;}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xorriso->prepended_wd= 0;
|
|
|
|
|
xorriso->request_to_abort= xorriso->request_not_to_ask= 0;
|
|
|
|
|
Xorriso_set_problem_status(xorriso, "", 0);
|
|
|
|
@ -13030,6 +13063,8 @@ int Xorriso_main(int argc, char **argv)
|
|
|
|
|
|
|
|
|
|
/* Interpret program arguments */
|
|
|
|
|
i= 1;
|
|
|
|
|
if(xorriso->permanent_emulation<0)
|
|
|
|
|
xorriso->permanent_emulation= -xorriso->permanent_emulation;
|
|
|
|
|
ret= Xorriso_interpreter(xorriso,argc,argv,&i,0);
|
|
|
|
|
if(ret==3)
|
|
|
|
|
goto end_sucessfully;
|
|
|
|
|