From 69fd5ff008fd575df30013cd3ef7171e0662bb36 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 22 May 2008 21:08:26 +0000 Subject: [PATCH] New options -osirrox and -cpx --- xorriso/xorriso.1 | 20 ++++++++++++++++++++ xorriso/xorriso.c | 10 +++++++++- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.c | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 96080d03..faf155de 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -1589,6 +1589,26 @@ Like -compare but working recursively. I.e. all file objects below both addresses get compared whether they have counterparts below the other address and whether both counterparts match. .TP +.B osirrox restore options: +.PP +Normally xorriso only writes to disk files which were given as stdio: +pseudo-drives or as log files. +But its alter ego, osirrox, is able to extract file objects +from ISO images and to create, overwrite, or delete file objects on disk. +.TP +\fB\-osirrox\fR "on"|"off" +Setting "off" disables disk filesystem manipulations. This is the default +unless the program was started with leafname "osirrox". Elsewise +the capability to restore files can be enabled explicitly by -osirrox "on". +.TP +\fB\-cpx\fR iso_rr_path [***] disk_path +Extract regular files from the ISO image and store them under the address given +by disk_path. If more then one iso_rr_path is given then disk_path must be +a directory or non-existent. In the latter case it gets created and the +extracted files get installed in it with the same leafnames. +.br +Missing directory components in disk_path will get created, if possible. +.TP .B Command compatibility emulations: .PP Writing of ISO 9660 on CD is traditionally done by program mkisofs diff --git a/xorriso/xorriso.c b/xorriso/xorriso.c index 2de2af69..f298482b 100644 --- a/xorriso/xorriso.c +++ b/xorriso/xorriso.c @@ -8647,7 +8647,7 @@ int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv, ret= Sfile_add_to_path(eff_dest, leafname, 0); if(ret<=0) { sprintf(xorriso->info_text, "Effective path gets much too long (%d)", - (int) (strlen(eff_dest)+strlen(leafname)+1i)); + (int) (strlen(eff_dest)+strlen(leafname)+1)); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); goto problem_handler; } @@ -9588,6 +9588,14 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -compare_r disk_path iso_rr_path ", " Like -compare but affecting all files below directories.", "", +"Restore options (copying file objects from ISO image to disk filesystem):", +" -osirrox \"on\"|\"off\"", +" By default \"off\" the inverse operation of xorriso from ISO", +" image to disk filesystem is disabled. \"on\" allows xorriso", +" to create, overwrite, delete files in the disk filesystem.", +" -cpx iso_rr_path [***] disk_path", +" Copy regular files from ISO image to disk filesystem.", +"", "Compatibility emulation (argument list may be ended by --):", " -as mkisofs [-help|-o|-R|-J|-V|-P|-f|-graft-points|-path-list|pathspecs]", " Perform some mkisofs gestures, understand pathspecs as mkisofs", diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 2d119a55..a24cf544 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.05.22.192737" +#define Xorriso_timestamP "2008.05.22.210835" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index 8e8679b1..cb5e1a30 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -2445,7 +2445,7 @@ int Xorriso_restore_implict_properties(struct XorrisO *xorriso, IsoDir *dir, int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node, char *img_path, char *disk_path, int flag) { - int ret, write_fd= -1, wanted, wret; + int ret= 0, write_fd= -1, wanted, wret; char *what= "[unknown filetype]", sfe[5*SfileadrL], buf[32*1024]; off_t todo, size; void *stream2= NULL;