Implemented -rollback

This commit is contained in:
Thomas Schmitt 2007-10-15 22:40:39 +00:00
parent bb4ecd309d
commit 08a65a6c91
3 changed files with 13 additions and 16 deletions

View File

@ -2967,18 +2967,6 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
if(ret<=0) if(ret<=0)
goto ex; goto ex;
} }
#ifdef No_morE
/* now done in Xorriso_graft_in */
l= strlen(target);
while(l>1) /* >>> ??? >0 ? */
if(target[l-1]=='/')
target[--l]= 0;
else
break;
#endif /* <<< */
if(source[0]!='/') { if(source[0]!='/') {
ret= Sfile_prepend_path(xorriso->wdx, source, 0); ret= Sfile_prepend_path(xorriso->wdx, source, 0);
if(ret<=0) if(ret<=0)
@ -4079,10 +4067,17 @@ int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag)
/* Option -rollback */ /* Option -rollback */
int Xorriso_option_rollback(struct XorrisO *xorriso, int flag) int Xorriso_option_rollback(struct XorrisO *xorriso, int flag)
{ {
int ret;
char indev[SfileadrL];
fprintf(stderr, ">>> LIBISOBURN : -rollback\n"); if(Sfile_str(indev, xorriso->indev, 0)<=0)
return(-1);
return(1); ret= Xorriso_give_up_drive(xorriso, 1);
if(ret<=0)
return(ret);
ret= Xorriso_option_dev(xorriso, indev,
1|((xorriso->out_drive_handle==NULL)<<1));
return(ret);
} }

View File

@ -1 +1 @@
#define Xorriso_timestamP "2007.10.15.203714" #define Xorriso_timestamP "2007.10.15.224005"

View File

@ -174,6 +174,7 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
struct isoburn. Then to be processed by: iso_volset_free(volset); struct isoburn. Then to be processed by: iso_volset_free(volset);
*/ */
xorriso->in_volset_handle= NULL; /* destroyed by isoburn_drive_release() */ xorriso->in_volset_handle= NULL; /* destroyed by isoburn_drive_release() */
xorriso->volset_change_pending= 0;
burn_drive_info_free(dinfo); burn_drive_info_free(dinfo);
xorriso->in_drive_handle= NULL; xorriso->in_drive_handle= NULL;
@ -191,6 +192,7 @@ int Xorriso_give_up_drive(struct XorrisO *xorriso, int flag)
return(1); return(1);
} }
int Xorriso_write_growing(struct XorrisO *xorriso, int flag) int Xorriso_write_growing(struct XorrisO *xorriso, int flag)
{ {
int ret; int ret;