From 36b7a1b110db5521c4f7ea880e5e27a99135983f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 27 Nov 2013 09:51:05 +0000 Subject: [PATCH] New -alter_date types: a-c , m-c , b-c , c --- libisoburn/trunk/xorriso/parse_exec.c | 9 ++ libisoburn/trunk/xorriso/xorriso.1 | 30 ++++-- libisoburn/trunk/xorriso/xorriso.info | 108 ++++++++++--------- libisoburn/trunk/xorriso/xorriso.texi | 30 ++++-- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 5 files changed, 114 insertions(+), 65 deletions(-) diff --git a/libisoburn/trunk/xorriso/parse_exec.c b/libisoburn/trunk/xorriso/parse_exec.c index a1bdad6a..c3583ce8 100644 --- a/libisoburn/trunk/xorriso/parse_exec.c +++ b/libisoburn/trunk/xorriso/parse_exec.c @@ -2675,12 +2675,21 @@ int Xorriso_convert_datestring(struct XorrisO *xorriso, char *cmd, { int ret; + *t_type= 0; if(strcmp(time_type, "a")==0) (*t_type)|= 1; + else if(strcmp(time_type, "a-c")==0) + (*t_type)|= 1 | 256; else if(strcmp(time_type, "m")==0) (*t_type)|= 4; + else if(strcmp(time_type, "m-c")==0) + (*t_type)|= 4 | 256; else if(strcmp(time_type, "b")==0) (*t_type)|= 5; + else if(strcmp(time_type, "b-c")==0) + (*t_type)|= 5 | 256; + else if(strcmp(time_type, "c")==0) + (*t_type)|= 2 | 256; else { sprintf(xorriso->info_text, "%s: Unrecognized type '%s'", cmd, time_type); if(!(flag & 1)) diff --git a/libisoburn/trunk/xorriso/xorriso.1 b/libisoburn/trunk/xorriso/xorriso.1 index 7834fcff..ccb5719d 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 "Version 1.3.3, Nov 14, 2013" +.TH XORRISO 1 "Version 1.3.3, Nov 27, 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1613,9 +1613,18 @@ must be represented as \\XYZ by their octal 8\-bit code XYZ. Use code \\000 for 0\-bytes. .TP \fB\-alter_date\fR type timestring iso_rr_path [***] -Alter the date entries of a file in the ISO image. type is -one of "a", "m", "b" for access time, modification time, -both times. +Alter the date entries of files in the ISO image. type may be one of +the following: +.br +"a" sets access time, updates ctime. +.br +"m" sets modification time, updates ctime. +.br +"b" sets access time and modification time, updates ctime. +.br +"a\-c", "m\-c", and "b\-c" set the times without updating ctime. +.br +"c" sets the ctime. .br timestring may be in the following formats (see also section EXAMPLES): @@ -1656,6 +1665,10 @@ These are normally given as GMT. The suffix "LOC" causes local timezone conversion. E.g. 2013010720574700, 2013010720574700LOC. The last two digits cc (centiseconds) will be ignored, but must be present in order to make the format recognizable. +.br +Example: +.br + \-alter_date m\-c 2013.11.27.103951 /file1 /file2 \-\- .TP \fB\-alter_date_r\fR type timestring iso_rr_path [***] Like \-alter_date but affecting all files below eventual directories. @@ -5072,8 +5085,11 @@ $ xorriso \-outdev /dev/sr0 \-blank as_needed \\ .SS .B Change existing file name tree from ISO-8859-1 to UTF-8 This example assumes that the existing ISO image was written with character -set ISO\-8859\-1 but that the readers expected UTF\-8. Now a new session with -the same files gets added with converted file names. +set ISO\-8859\-1 but that the readers expected UTF\-8. Now a new session +gets added with converted file names. +Command \-changes_pending "yes" enables writing despite the lack of any +manipulation command. +.br In order to avoid any weaknesses of the local character set, this command pretends that it uses already the final target set UTF\-8. Therefore strange file names may appear in messages, which @@ -5083,7 +5099,7 @@ $ xorriso \-in_charset ISO\-8859\-1 \-local_charset UTF\-8 \\ .br \-out_charset UTF\-8 \-backslash_codes on \-dev /dev/sr0 \\ .br - \-alter_date m +0 / \-\- \-commit \-eject all + \-changes_pending yes \-commit \-eject all .SS .B Operate on storage facilities other than optical drives Full read\-write operation is possible with regular files and block devices: diff --git a/libisoburn/trunk/xorriso/xorriso.info b/libisoburn/trunk/xorriso/xorriso.info index 360d3a39..281a4cf0 100644 --- a/libisoburn/trunk/xorriso/xorriso.info +++ b/libisoburn/trunk/xorriso/xorriso.info @@ -1470,8 +1470,13 @@ whether they stem from the loaded image or were newly inserted. \XYZ by their octal 8-bit code XYZ. Use code \000 for 0-bytes. -alter_date type timestring iso_rr_path [***] - Alter the date entries of a file in the ISO image. type is one of - "a", "m", "b" for access time, modification time, both times. + Alter the date entries of files in the ISO image. type may be one + of the following: + "a" sets access time, updates ctime. + "m" sets modification time, updates ctime. + "b" sets access time and modification time, updates ctime. + "a-c", "m-c", and "b-c" set the times without updating ctime. + "c" sets the ctime. timestring may be in the following formats (see also section EXAMPLES): As expected by program date: MMDDhhmm[[CC]YY][.ss]] @@ -1494,6 +1499,8 @@ whether they stem from the loaded image or were newly inserted. timezone conversion. E.g. 2013010720574700, 2013010720574700LOC. The last two digits cc (centiseconds) will be ignored, but must be present in order to make the format recognizable. + Example: + -alter_date m-c 2013.11.27.103951 /file1 /file2 - -alter_date_r type timestring iso_rr_path [***] Like -alter_date but affecting all files below eventual @@ -4418,15 +4425,16 @@ File: xorriso.info, Node: ExCharset, Next: ExPseudo, Prev: ExBootable, Up: E This example assumes that the existing ISO image was written with character set ISO-8859-1 but that the readers expected UTF-8. Now a new -session with the same files gets added with converted file names. In -order to avoid any weaknesses of the local character set, this command -pretends that it uses already the final target set UTF-8. Therefore -strange file names may appear in messages, which will be made +session gets added with converted file names. Command -changes_pending +"yes" enables writing despite the lack of any manipulation command. +In order to avoid any weaknesses of the local character set, this +command pretends that it uses already the final target set UTF-8. +Therefore strange file names may appear in messages, which will be made terminal-safe by command -backslash_codes. $ xorriso -in_charset ISO-8859-1 -local_charset UTF-8 \ -out_charset UTF-8 -backslash_codes on -dev /dev/sr0 \ --alter_date m +0 / -- -commit -eject all +-changes_pending yes -commit -eject all  File: xorriso.info, Node: ExPseudo, Next: ExCdrecord, Prev: ExCharset, Up: Examples @@ -4843,7 +4851,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -add inserts one or more paths: Insert. (line 46) * -add_plainly inserts one or more paths: Insert. (line 65) * -alter_date sets timestamps in ISO image: Manip. (line 154) -* -alter_date_r sets timestamps in ISO image: Manip. (line 180) +* -alter_date_r sets timestamps in ISO image: Manip. (line 187) * -append_partition adds arbitrary file after image end: Bootable. (line 249) * -application_id sets application id: SetWrite. (line 192) @@ -4931,7 +4939,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -hardlinks controls handling of hard links: Loading. (line 134) * -help prints help text: Scripting. (line 20) * -hfsplus enables production of HFS+ partition: SetWrite. (line 14) -* -hide excludes file names from directory trees: Manip. (line 184) +* -hide excludes file names from directory trees: Manip. (line 191) * -history brings text into readline history: Scripting. (line 44) * -in_charset sets input character set: Loading. (line 116) * -indev acquires a drive for input: AqDrive. (line 24) @@ -5166,7 +5174,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Hard links, control handling, -hardlinks: Loading. (line 134) * HFS+ allocation block size: Bootable. (line 237) * HFS+ serial number: Bootable. (line 234) -* hidden, set in ISO image, -hide: Manip. (line 184) +* hidden, set in ISO image, -hide: Manip. (line 191) * Image reading, cache size, -data_cache_size: Loading. (line 296) * Image, _definition: Model. (line 9) * Image, demand volume ID, -assert_volid: Loading. (line 108) @@ -5319,7 +5327,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Table-of-content, search sessions, -rom_toc_scan: Loading. (line 238) * Table-of-content, show, -toc: Inquiry. (line 28) * Timestamps, set in ISO image, -alter_date: Manip. (line 154) -* Timestamps, set in ISO image, -alter_date_r: Manip. (line 180) +* Timestamps, set in ISO image, -alter_date_r: Manip. (line 187) * Tree, disk, traverse, -findx: Navigate. (line 106) * Tree, ISO, traverse and alter, -find: CmdFind. (line 7) * Verify, check blocks, -check_media: Verify. (line 21) @@ -5375,44 +5383,44 @@ Node: Loading30836 Node: Insert47765 Node: SetInsert57964 Node: Manip66541 -Node: CmdFind76050 -Node: Filter91092 -Node: Writing95648 -Node: SetWrite105779 -Node: Bootable126104 -Node: Jigdo142494 -Node: Charset146741 -Node: Exception149503 -Node: DialogCtl155623 -Node: Inquiry158221 -Node: Navigate164538 -Node: Verify172836 -Node: Restore181868 -Node: Emulation188955 -Node: Scripting199257 -Node: Frontend207028 -Node: Examples216635 -Node: ExDevices217813 -Node: ExCreate218472 -Node: ExDialog219757 -Node: ExGrowing221022 -Node: ExModifying221827 -Node: ExBootable222331 -Node: ExCharset222883 -Node: ExPseudo223704 -Node: ExCdrecord224602 -Node: ExMkisofs224919 -Node: ExGrowisofs226259 -Node: ExException227394 -Node: ExTime227848 -Node: ExIncBackup228307 -Node: ExRestore232287 -Node: ExRecovery233220 -Node: Files233790 -Node: Seealso235089 -Node: Bugreport235812 -Node: Legal236393 -Node: CommandIdx237404 -Node: ConceptIdx254066 +Node: CmdFind76321 +Node: Filter91363 +Node: Writing95919 +Node: SetWrite106050 +Node: Bootable126375 +Node: Jigdo142765 +Node: Charset147012 +Node: Exception149774 +Node: DialogCtl155894 +Node: Inquiry158492 +Node: Navigate164809 +Node: Verify173107 +Node: Restore182139 +Node: Emulation189226 +Node: Scripting199528 +Node: Frontend207299 +Node: Examples216906 +Node: ExDevices218084 +Node: ExCreate218743 +Node: ExDialog220028 +Node: ExGrowing221293 +Node: ExModifying222098 +Node: ExBootable222602 +Node: ExCharset223154 +Node: ExPseudo224046 +Node: ExCdrecord224944 +Node: ExMkisofs225261 +Node: ExGrowisofs226601 +Node: ExException227736 +Node: ExTime228190 +Node: ExIncBackup228649 +Node: ExRestore232629 +Node: ExRecovery233562 +Node: Files234132 +Node: Seealso235431 +Node: Bugreport236154 +Node: Legal236735 +Node: CommandIdx237746 +Node: ConceptIdx254408  End Tag Table diff --git a/libisoburn/trunk/xorriso/xorriso.texi b/libisoburn/trunk/xorriso/xorriso.texi index 4417ab31..f7e0ae31 100644 --- a/libisoburn/trunk/xorriso/xorriso.texi +++ b/libisoburn/trunk/xorriso/xorriso.texi @@ -50,7 +50,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 "Version 1.3.3, Nov 14, 2013" +@c man .TH XORRISO 1 "Version 1.3.3, Nov 27, 2013" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1981,9 +1981,18 @@ Use code \000 for 0-bytes. @item -alter_date type timestring iso_rr_path [***] @kindex -alter_date sets timestamps in ISO image @cindex Timestamps, set in ISO image, -alter_date -Alter the date entries of a file in the ISO image. type is -one of "a", "m", "b" for access time, modification time, -both times. +Alter the date entries of files in the ISO image. type may be one of +the following: +@* +"a" sets access time, updates ctime. +@* +"m" sets modification time, updates ctime. +@* +"b" sets access time and modification time, updates ctime. +@* +"a-c", "m-c", and "b-c" set the times without updating ctime. +@* +"c" sets the ctime. @* timestring may be in the following formats (see also section EXAMPLES): @@ -2024,6 +2033,10 @@ These are normally given as GMT. The suffix "LOC" causes local timezone conversion. E.g. 2013010720574700, 2013010720574700LOC. The last two digits cc (centiseconds) will be ignored, but must be present in order to make the format recognizable. +@* +Example: +@* + -alter_date m-c 2013.11.27.103951 /file1 /file2 -- @c man .TP @item -alter_date_r type timestring iso_rr_path [***] @kindex -alter_date_r sets timestamps in ISO image @@ -5947,8 +5960,11 @@ $ xorriso -outdev /dev/sr0 -blank as_needed \ @node ExCharset, ExPseudo, ExBootable, Examples @section Change existing file name tree from ISO-8859-1 to UTF-8 This example assumes that the existing ISO image was written with character -set ISO-8859-1 but that the readers expected UTF-8. Now a new session with -the same files gets added with converted file names. +set ISO-8859-1 but that the readers expected UTF-8. Now a new session +gets added with converted file names. +Command -changes_pending "yes" enables writing despite the lack of any +manipulation command. +@* In order to avoid any weaknesses of the local character set, this command pretends that it uses already the final target set UTF-8. Therefore strange file names may appear in messages, which @@ -5959,7 +5975,7 @@ $ xorriso -in_charset ISO-8859-1 -local_charset UTF-8 \ @* -out_charset UTF-8 -backslash_codes on -dev /dev/sr0 \ @* - -alter_date m +0 / @minus{}@minus{} -commit -eject all + -changes_pending yes -commit -eject all @c man .SS @c man .B Operate on storage facilities other than optical drives @node ExPseudo, ExCdrecord, ExCharset, Examples diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index c6906f77..ae7adc12 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2013.11.18.140456" +#define Xorriso_timestamP "2013.11.27.094951"