From b4eae1ee7ad7759f08977700d9972cc406abf1ad Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 21 Mar 2011 16:55:18 +0000 Subject: [PATCH] New -early_stdio_test option appendable_wo --- libisoburn/trunk/xorriso/drive_mgt.c | 2 +- libisoburn/trunk/xorriso/opts_d_h.c | 4 +- libisoburn/trunk/xorriso/text_io.c | 5 +- libisoburn/trunk/xorriso/xorriso.1 | 7 +- libisoburn/trunk/xorriso/xorriso.info | 87 ++++++++++---------- libisoburn/trunk/xorriso/xorriso.texi | 7 +- libisoburn/trunk/xorriso/xorriso_private.h | 5 ++ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 8 files changed, 68 insertions(+), 51 deletions(-) diff --git a/libisoburn/trunk/xorriso/drive_mgt.c b/libisoburn/trunk/xorriso/drive_mgt.c index 92b794b8..9ea3e110 100644 --- a/libisoburn/trunk/xorriso/drive_mgt.c +++ b/libisoburn/trunk/xorriso/drive_mgt.c @@ -225,7 +225,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) if((xorriso->ino_behavior & (1 | 2)) && !(xorriso->do_aaip & (4 | 32))) aquire_flag|= 64; burn_preset_device_open(xorriso->drives_exclusive, 0, 0); - burn_allow_drive_role_4(1 | (xorriso->early_stdio_test & 6)); + burn_allow_drive_role_4(1 | (xorriso->early_stdio_test & 14)); ret= isoburn_drive_aquire(&dinfo, libburn_adr, aquire_flag); burn_preset_device_open(1, 0, 0); Xorriso_process_msg_queues(xorriso,0); diff --git a/libisoburn/trunk/xorriso/opts_d_h.c b/libisoburn/trunk/xorriso/opts_d_h.c index 2d7ec7c4..303bff8c 100644 --- a/libisoburn/trunk/xorriso/opts_d_h.c +++ b/libisoburn/trunk/xorriso/opts_d_h.c @@ -308,6 +308,8 @@ int Xorriso_option_early_stdio_test(struct XorrisO *xorriso, char *mode, xorriso->early_stdio_test= 2 | 4; else if(strcmp(mode, "off") == 0) xorriso->early_stdio_test= 0; + else if(strcmp(mode, "appendable_wo") == 0) + xorriso->early_stdio_test= 2 | 4 | 8; else { sprintf(xorriso->info_text, "-early_stdio_test: unknown mode '%s'", mode); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); @@ -1431,7 +1433,7 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " Enable production of scdbackup tag with -md5 on", " -ban_stdio_write", " Allow for writing only the usage of optical drives.", -" -early_stdio_test", +" -early_stdio_test \"on\"|\"appendable_wo\"|\"off\"", " Classify stdio drives by effective access permissions.", " -blank \"fast\"|\"all\"|\"deformat\"|\"deformat_quickest\"", " Blank media resp. invalidate ISO image on media.", diff --git a/libisoburn/trunk/xorriso/text_io.c b/libisoburn/trunk/xorriso/text_io.c index 4f1428d6..b2f30c45 100644 --- a/libisoburn/trunk/xorriso/text_io.c +++ b/libisoburn/trunk/xorriso/text_io.c @@ -1242,9 +1242,10 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) Xorriso_status_result(xorriso,filter,fp,flag&2); } - is_default= ((xorriso->early_stdio_test & 6) == 0); + is_default= ((xorriso->early_stdio_test & 14) == 0); sprintf(line, "-early_stdio_test %s\n", - xorriso->early_stdio_test & 6 ? "on" : "off"); + xorriso->early_stdio_test & 6 ? xorriso->early_stdio_test & 8 ? + "appendable_wo" : "on" : "off"); if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); diff --git a/libisoburn/trunk/xorriso/xorriso.1 b/libisoburn/trunk/xorriso/xorriso.1 index bd8bd6d0..39beda5d 100644 --- a/libisoburn/trunk/xorriso/xorriso.1 +++ b/libisoburn/trunk/xorriso/xorriso.1 @@ -9,7 +9,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH XORRISO 1 "Mar 09, 2011" +.TH XORRISO 1 "Mar 21, 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -873,7 +873,7 @@ Allow for writing only the usage of MMC optical drives. Disallow to write the result into files of nearly arbitrary type. Once set, this command cannot be revoked. .TP -\fB\-early_stdio_test\fR "on"|"off" +\fB\-early_stdio_test\fR "on"|"appendable_wo"|"off" If enabled by "on" then regular files and block devices get tested for effective access permissions. This implies to try opening those files for writing, which otherwise will happen only later and only if actual @@ -882,6 +882,9 @@ writing is desired. The test result is used for classifying the pseudo drives as overwriteable, read-only, write-only, or uselessly empty. This may lead to earlier detection of severe problems, and may avoid some less severe error events. +.br +Mode "appendable_wo" is like "on" with the additional property that +non-empty write-only files are regarded as appendable rather than blank. .TP .B Inserting files into ISO image: .PP diff --git a/libisoburn/trunk/xorriso/xorriso.info b/libisoburn/trunk/xorriso/xorriso.info index 3d8e2e9c..d530a428 100644 --- a/libisoburn/trunk/xorriso/xorriso.info +++ b/libisoburn/trunk/xorriso/xorriso.info @@ -824,7 +824,7 @@ activate them only after image loading. to write the result into files of nearly arbitrary type. Once set, this command cannot be revoked. --early_stdio_test "on"|"off" +-early_stdio_test "on"|"appendable_wo"|"off" If enabled by "on" then regular files and block devices get tested for effective access permissions. This implies to try opening those files for writing, which otherwise will happen only later @@ -833,6 +833,9 @@ activate them only after image loading. overwriteable, read-only, write-only, or uselessly empty. This may lead to earlier detection of severe problems, and may avoid some less severe error events. + Mode "appendable_wo" is like "on" with the additional property that + non-empty write-only files are regarded as appendable rather than + blank.  File: xorriso.info, Node: Insert, Next: SetInsert, Prev: Loading, Up: Options @@ -4549,46 +4552,46 @@ Node: Dialog21570 Node: Options23227 Node: AqDrive24835 Node: Loading27741 -Node: Insert41888 -Node: SetInsert51507 -Node: Manip60074 -Node: CmdFind68755 -Node: Filter80055 -Node: Writing84404 -Node: SetWrite90693 -Node: Bootable104634 -Node: Jigdo117952 -Node: Charset122210 -Node: Exception124961 -Node: DialogCtl129472 -Node: Inquiry132059 -Node: Navigate136436 -Node: Verify144376 -Node: Restore152965 -Node: Emulation159621 -Node: Scripting169457 -Node: Frontend175019 -Node: Examples176314 -Node: ExDevices177483 -Node: ExCreate178117 -Node: ExDialog179391 -Node: ExGrowing180653 -Node: ExModifying181455 -Node: ExBootable181956 -Node: ExCharset182503 -Node: ExPseudo183331 -Node: ExCdrecord184225 -Node: ExMkisofs184540 -Node: ExGrowisofs185876 -Node: ExException187000 -Node: ExTime187454 -Node: ExIncBackup187913 -Node: ExRestore191834 -Node: ExRecovery192803 -Node: Files193369 -Node: Seealso194597 -Node: Legal195177 -Node: CommandIdx196099 -Node: ConceptIdx210479 +Node: Insert42060 +Node: SetInsert51679 +Node: Manip60246 +Node: CmdFind68927 +Node: Filter80227 +Node: Writing84576 +Node: SetWrite90865 +Node: Bootable104806 +Node: Jigdo118124 +Node: Charset122382 +Node: Exception125133 +Node: DialogCtl129644 +Node: Inquiry132231 +Node: Navigate136608 +Node: Verify144548 +Node: Restore153137 +Node: Emulation159793 +Node: Scripting169629 +Node: Frontend175191 +Node: Examples176486 +Node: ExDevices177655 +Node: ExCreate178289 +Node: ExDialog179563 +Node: ExGrowing180825 +Node: ExModifying181627 +Node: ExBootable182128 +Node: ExCharset182675 +Node: ExPseudo183503 +Node: ExCdrecord184397 +Node: ExMkisofs184712 +Node: ExGrowisofs186048 +Node: ExException187172 +Node: ExTime187626 +Node: ExIncBackup188085 +Node: ExRestore192006 +Node: ExRecovery192975 +Node: Files193541 +Node: Seealso194769 +Node: Legal195349 +Node: CommandIdx196271 +Node: ConceptIdx210651  End Tag Table diff --git a/libisoburn/trunk/xorriso/xorriso.texi b/libisoburn/trunk/xorriso/xorriso.texi index af31c044..556a644b 100644 --- a/libisoburn/trunk/xorriso/xorriso.texi +++ b/libisoburn/trunk/xorriso/xorriso.texi @@ -44,7 +44,7 @@ @c man .\" First parameter, NAME, should be all caps @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" other parameters are allowed: see man(7), man(1) -@c man .TH XORRISO 1 "Mar 09, 2011" +@c man .TH XORRISO 1 "Mar 21, 2011" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1097,7 +1097,7 @@ Allow for writing only the usage of MMC optical drives. Disallow to write the result into files of nearly arbitrary type. Once set, this command cannot be revoked. @c man .TP -@item -early_stdio_test "on"|"off" +@item -early_stdio_test "on"|"appendable_wo"|"off" @kindex -early_stdio_test classifies stdio drives @cindex Drive, classify stdio, -early_stdio_test If enabled by "on" then regular files and block devices get tested for @@ -1108,6 +1108,9 @@ writing is desired. The test result is used for classifying the pseudo drives as overwriteable, read-only, write-only, or uselessly empty. This may lead to earlier detection of severe problems, and may avoid some less severe error events. +@* +Mode "appendable_wo" is like "on" with the additional property that +non-empty write-only files are regarded as appendable rather than blank. @end table @c man .TP @c man .B Inserting files into ISO image: diff --git a/libisoburn/trunk/xorriso/xorriso_private.h b/libisoburn/trunk/xorriso/xorriso_private.h index b486a585..03043663 100644 --- a/libisoburn/trunk/xorriso/xorriso_private.h +++ b/libisoburn/trunk/xorriso/xorriso_private.h @@ -256,6 +256,11 @@ struct XorrisO { /* the global context of xorriso */ read-write resp. read-only resp. write only. bit2= Classify files which cannot be opened at all as role 0 : useless dummy. + bit3= Classify non-empty role 5 drives as + BURN_DISC_APPENDABLE with NWA after the + end of the file. It is nevertheless + possible to change this address by call + burn_write_opts_set_start_byte(). */ int do_calm_drive; /* bit0= calm down drive after aquiring it */ diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index eb18dd9c..2ef5ae0e 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.03.21.113858" +#define Xorriso_timestamP "2011.03.21.165533"