diff --git a/test/xorriso.1 b/test/xorriso.1 index 022bc6fb..733dbf39 100644 --- a/test/xorriso.1 +++ b/test/xorriso.1 @@ -709,6 +709,9 @@ Mark end of particular action argument list. \fB\-rollback\fR Discard the manipulated ISO image and reload it from -indev. .TP +\fB\-rollback_end\fR +Discard the manipulated ISO image. End program without loading a new image. +.TP .B Writing the result: (see also paragraph about settings below) .TP diff --git a/test/xorriso.c b/test/xorriso.c index d824cc9c..4faf7d65 100644 --- a/test/xorriso.c +++ b/test/xorriso.c @@ -6741,14 +6741,19 @@ int Xorriso_option_eject(struct XorrisO *xorriso, char *which, int flag) /* Option -end */ +/* @param flag bit0= discard pending changes */ int Xorriso_option_end(struct XorrisO *xorriso, int flag) { int ret; if(xorriso->volset_change_pending) { - ret= Xorriso_option_commit(xorriso, 1); - if(ret<=0) - return(ret); + if(flag&1) { + xorriso->volset_change_pending= 0; + } else { + ret= Xorriso_option_commit(xorriso, 1); + if(ret<=0) + return(ret); + } } ret= Xorriso_give_up_drive(xorriso, 3); if(ret<=0) @@ -7293,7 +7298,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " # any text Is ignored. In dialog mode the input line will be stored in", " the eventual readline history, nevertheless.", " -version Tell program and version number", -" -end End program immediately", +" -end End program. Commit eventual pending changes.", +" -rollback_end", +" End program. Discard pending changes.", "", "", "Option -page causes a user prompt after the given number of result lines.", @@ -8620,6 +8627,13 @@ next_command:; } else if(strcmp(cmd,"rollback")==0) { ret= Xorriso_option_rollback(xorriso, 0); + } else if(strcmp(cmd,"rollback_end")==0) { + Xorriso_option_end(xorriso, 1); + ret= Xorriso_eval_problem_status(xorriso, ret, 0); + if(ret<0) + return(ret); + {ret= 3; goto ex;} + } else if(strcmp(cmd,"speed")==0) { (*idx)++; ret= Xorriso_option_speed(xorriso, arg1, 0); diff --git a/test/xorriso.h b/test/xorriso.h index 523348b0..887b676a 100644 --- a/test/xorriso.h +++ b/test/xorriso.h @@ -231,6 +231,7 @@ int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_eject(struct XorrisO *xorriso, char *which, int flag); /* Option -end */ +/* @param flag bit0= discard pending changes */ int Xorriso_option_end(struct XorrisO *xorriso, int flag); /* Option -iso_rr_pattern "on"|"ls"|"off" */ diff --git a/test/xorriso_timestamp.h b/test/xorriso_timestamp.h index e2ca6b24..6b302a08 100644 --- a/test/xorriso_timestamp.h +++ b/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.01.24.202206" +#define Xorriso_timestamP "2008.01.25.150902"