From 3fb55a5dd26f09261b865c676f4f92311d9304c1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 2 Feb 2008 13:19:53 +0000 Subject: [PATCH] Added argument to option -commit_eject --- libisoburn/trunk/xorriso/xorriso.c | 21 +++++++++++++------- libisoburn/trunk/xorriso/xorriso.h | 6 ++++-- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index 3215725d..90509fe4 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -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