Added argument to option -commit_eject

This commit is contained in:
Thomas Schmitt 2008-02-02 13:19:53 +00:00
parent 1af7bf4eaf
commit 3fb55a5dd2
3 changed files with 19 additions and 10 deletions

View File

@ -6494,7 +6494,9 @@ int Xorriso_option_close(struct XorrisO *xorriso, char *mode, int flag)
/* Option -commit */
/* @param flag bit0= do not aquire outdrive as new indrive */
/* @param flag bit0= leave indrive and outdrive aquired as they were,
i.e. do not aquire outdrive as new in-out-drive
*/
int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
{
int ret;
@ -6518,15 +6520,18 @@ int Xorriso_option_commit(struct XorrisO *xorriso, int flag)
/* Option -commit_eject */
int Xorriso_option_commit_eject(struct XorrisO *xorriso, int flag)
int Xorriso_option_commit_eject(struct XorrisO *xorriso, char *which, int flag)
{
int ret, eret;
ret= Xorriso_option_commit(xorriso, 1);
if(ret<=0)
return(ret);
eret= Xorriso_option_eject(xorriso, "out", 0);
ret= Xorriso_option_dev(xorriso, "", 1);
if(strcmp(which, "none")==0 || strcmp(which, "")==0)
eret= 1;
else
eret= Xorriso_option_eject(xorriso, which, 0);
ret= Xorriso_option_dev(xorriso, "", 3);
if(eret<ret)
return(eret);
return(ret);
@ -7199,8 +7204,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" -commit Perform the write operation and then perform -dev outdrive.",
" Hint: To perform a final write operation with no new -dev",
" and no new loading of image, execute option -end.",
" -commit_eject Like -commit but rather eject than load image from outdrive.",
"",
" -commit_eject \"in\"|\"out\"|\"all\"|\"none\"",
" Like -commit but rather eject than load image from outdrive.",
" Give up any unejected drive afterwards.",
" -close \"on\"|\"off\"",
" If \"on\" then mark the written media as not appendable.",
" -dummy \"on\"|\"off\"",
@ -8444,7 +8450,8 @@ next_command:;
ret= Xorriso_option_commit(xorriso, 0);
} else if(strcmp(cmd,"commit_eject")==0) {
ret= Xorriso_option_commit_eject(xorriso, 0);
(*idx)++;
ret= Xorriso_option_commit_eject(xorriso, arg1, 0);
} else if(strcmp(cmd,"cpr")==0 || strcmp(cmd,"cpri")==0) {
ret= Xorriso_option_cpri(xorriso, argc, argv, idx, 0);

View File

@ -200,11 +200,13 @@ int Xorriso_option_chowni(struct XorrisO *xorriso, char *uid,
int Xorriso_option_close(struct XorrisO *xorriso, char *mode, int flag);
/* Option -commit */
/* @param flag bit0= do not aquire outdrive as new indrive */
/* @param flag bit0= leave indrive and outdrive aquired as they were,
i.e. do not aquire outdrive as new in-out-drive
*/
int Xorriso_option_commit(struct XorrisO *xorriso, int flag);
/* Option -commit_eject */
int Xorriso_option_commit_eject(struct XorrisO *xorriso, int flag);
int Xorriso_option_commit_eject(struct XorrisO *xorriso, char *which, int flag);
/* Option -cpr alias -cpri */
int Xorriso_option_cpri( struct XorrisO *xorriso, int argc, char **argv,

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.02.02.131049"
#define Xorriso_timestamP "2008.02.02.131903"