From 87d0db49f4923ddfe620fe6de1ca4eaf1f45d5e1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 7 Apr 2010 20:27:05 +0000 Subject: [PATCH] New option -volume_date, for grub-mkrescue: -as mkisofs --modification-date= --- libisoburn/trunk/xorriso/xorriso.1 | 30 +++- libisoburn/trunk/xorriso/xorriso.c | 164 ++++++++++++++++- libisoburn/trunk/xorriso/xorriso.h | 4 + libisoburn/trunk/xorriso/xorriso.info | 177 +++++++++++-------- libisoburn/trunk/xorriso/xorriso.texi | 32 +++- libisoburn/trunk/xorriso/xorriso_private.h | 9 + libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 4 + 8 files changed, 338 insertions(+), 84 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.1 b/libisoburn/trunk/xorriso/xorriso.1 index 5547962c..599bad73 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 "Apr 06, 2010" +.TH XORRISO 1 "Apr 07, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1985,6 +1985,34 @@ System Area in image blocks 0 to 15. Permissible are up to 32 characters. This setting gets overridden by image loading. .TP +\fB\-volume_date\fR type timestring +Set one of the four overall timestamps for subsequent image writing. +Available types are: +.br +"c" time when the volume was created. +.br +"m" time when volume was last modified. +.br +"x" time when the information in the volume expires. +.br +"f" time since when the volume is effectively valid. +.br +"uuid" sets a timestring that overrides "m" time literally. +.br +It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with +YYYY between 1970 and 2999. +It is supposed to match this GRUB line: +.br + search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc +.br +E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds). +.br +Timestrings for the other types may be given as with option -alter_date. +They are prone to timezone computations. The timestrings "default" or +"overridden" cause default settings: "c" and "m" will show the current time +of image creation. "x" and "f" will be marked as insignificant. +"uuid" will be deactivated. +.TP \fB\-out_charset\fR character_set_name Set the character set to which file names get converted when writing an image. See paragraph "Character sets" for more explanations. diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index 1005d62c..9c7f0826 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -1456,6 +1456,45 @@ ex: } +int Decode_ecma119_format(struct tm *erg, char *text, int flag) +/* YYYYMMDDhhmmsscc */ +/* 2010040711405800 */ +{ + int i, l, num; + + memset(erg, 0, sizeof(*erg)); + erg->tm_isdst= -1; + l= strlen(text); + if(l != 16) + return(0); + for(i= 0; i < l; i++) + if(text[i] < '0' || text[i] > '9') + return(0); + num= 0; + for(i= 0; i < 4; i++) + num= num * 10 + text[i] - '0'; + if(num < 1970 || num > 3000) + return(0); + erg->tm_year = num - 1900; + erg->tm_mon= 10*(text[4]-'0')+text[5]-'0'-1; + if(erg->tm_mon > 12) + return(0); + erg->tm_mday= 10*(text[6]-'0')+text[7]-'0'; + if(erg->tm_mday > 31) + return(0); + erg->tm_hour= 10*(text[8]-'0')+text[9]-'0'; + if(erg->tm_hour > 23) + return(0); + erg->tm_min= 10*(text[10]-'0')+text[11]-'0'; + if(erg->tm_min > 59) + return(0); + erg->tm_sec= 10*(text[12]-'0')+text[13]-'0'; + if(erg->tm_sec > 59) + return(0); + return(1); +} + + int Decode_xorriso_timestamp(struct tm *erg, char *code, int flag) /* 2007.11.07.225624 */ { @@ -1589,6 +1628,12 @@ time_t Decode_timestring(char *code, time_t *date, int flag) seconds= mktime(&result_tm); seconds_valid= 1; goto completed; + } else if(Decode_ecma119_format(&result_tm, code, 0)>0) { + /* YYYYMMDDhhmmsscc */ + /* 2010040711405800 */ + seconds= mktime(&result_tm); + seconds_valid= 1; + goto completed; } return(0); completed:; @@ -4847,6 +4892,11 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->system_area_disk_path[0]= 0; m->system_area_options= 0; + m->vol_creation_time= 0; + m->vol_modification_time= 0; + m->vol_expiration_time= 0; + m->vol_effective_time= 0; + m->vol_uuid[0]= 0; m->loaded_boot_bin_lba= 0; m->loaded_boot_cat_path[0]= 0; m->allow_graft_points= 0; @@ -7069,6 +7119,41 @@ bin_path:; if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); + is_default= (xorriso->vol_creation_time == 0); + sprintf(line,"-volume_date c %s\n", + is_default ? "default" : + Ftimetxt(xorriso->vol_creation_time, sfe, 2)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + + is_default= (xorriso->vol_modification_time == 0); + sprintf(line,"-volume_date m %s\n", + xorriso->vol_uuid[0] ? "overridden" : + is_default ? "default" : + Ftimetxt(xorriso->vol_modification_time, sfe, 2)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + + is_default= (xorriso->vol_expiration_time == 0); + sprintf(line,"-volume_date x %s\n", + is_default ? "default" : + Ftimetxt(xorriso->vol_expiration_time, sfe, 2)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + + is_default= (xorriso->vol_effective_time == 0); + sprintf(line,"-volume_date f %s\n", + is_default ? "default" : + Ftimetxt(xorriso->vol_effective_time, sfe, 2)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + + is_default= (xorriso->vol_uuid[0] == 0); + sprintf(line,"-volume_date uuid %s\n", + Text_shellsafe(xorriso->vol_uuid,sfe,0)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + is_default= (xorriso->do_joliet==0); sprintf(line,"-joliet %s\n", (xorriso->do_joliet == 1 ? "on" : "off")); if(!(is_default && no_defaults)) @@ -9195,6 +9280,7 @@ unrecognizable:; } +/* @param flag bit0= do not complain in case of error, but set info_text */ int Xorriso_convert_datestring(struct XorrisO *xorriso, char *cmd, char *time_type, char *timestring, int *t_type, time_t *t, int flag) @@ -9209,14 +9295,16 @@ int Xorriso_convert_datestring(struct XorrisO *xorriso, char *cmd, (*t_type)|= 5; else { sprintf(xorriso->info_text, "%s: Unrecognized type '%s'", cmd, time_type); - Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + if(!(flag & 1)) + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); return(0); } ret= Decode_timestring(timestring, t, 0); if(ret<=0) { sprintf(xorriso->info_text, "%s: Cannot decode timestring '%s'", cmd, timestring); - Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + if(!(flag & 1)) + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); return(0); } sprintf(xorriso->info_text, "Understanding timestring '%s' as: %s", @@ -11096,6 +11184,8 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) " -boot-info-table Patch boot image with info table", " -G FILE, -generic-boot FILE Set generic boot image name", " --protective-msdos-label Patch System Area by partition table", +" --modification-date=YYYYMMDDhhmmsscc", +" Override modification date", #ifdef Xorriso_with_isohybriD " isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation", #endif @@ -11253,6 +11343,10 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, goto ex; } else if(strcmp(argv[i], "--protective-msdos-label")==0) { xorriso->system_area_options|= 1; + } else if(strncmp(argv[i], "--modification-date=", 20)==0) { + ret= Xorriso_option_volume_date(xorriso, "uuid", argv[i] + 20, 0); + if(ret <= 0) + goto problem_handler_1; } else if(strcmp(argv[i], "-input-charset")==0) { if(i+1>=argc) goto not_enough_args; @@ -11523,6 +11617,8 @@ not_enough_args:; /* was already handled in first argument scan */; } else if(strcmp(argv[i], "--protective-msdos-label")==0) { /* was already handled in first argument scan */; + } else if(strncmp(argv[i], "--modification-date=", 20)==0) { + /* was already handled in first argument scan */; } else if(strcmp(argv[i], "-boot-load-size") == 0) { i++; /* was already handled in first argument scan */; @@ -16357,6 +16453,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " Specifies the application id. (128 chars)", " -system_id name", " Specifies the system id for the System Area. (32 chars)", +" -volume_date type timestring", +" Specifies volume timestamps. [\"c\",\"m\",\"x\",\"f\",\"uuid\"]", " -joliet \"on\"|\"off\"", " Generate Joliet info additional to Rock Ridge info.", " -compliance rule[:rule...]", @@ -19595,6 +19693,62 @@ int Xorriso_option_volset_id(struct XorrisO *xorriso, char *name, int flag) } +/* Option -volume_date */ +int Xorriso_option_volume_date(struct XorrisO *xorriso, + char *time_type, char *timestring, int flag) +{ + int ret, t_type= 0; + time_t t; + struct tm erg; + + if(timestring[0] == 0 || strcmp(timestring, "default") == 0 || + strcmp(timestring, "overridden") == 0 ){ + t= 0; + } else if(strcmp(time_type, "uuid") != 0) { + ret= Xorriso_convert_datestring(xorriso, "-volume_date", + "m", timestring, &t_type, &t, 0); + if(ret<=0) + goto ex; + } + if(strcmp(time_type, "uuid") == 0) { + if(t == 0) { + xorriso->vol_uuid[0]= 0; + ret= 1; goto ex; + } + ret= Decode_ecma119_format(&erg, timestring, 0); + if(ret <= 0) { + sprintf(xorriso->info_text, "-volume_date uuid : Not an ECMA-119 time string. (16 decimal digits, range 1970... to 2999...)"); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); + ret= 0; goto ex; + } + strcpy(xorriso->vol_uuid, timestring); + if(erg.tm_year < 138) { + sprintf(xorriso->info_text, + "Understanding ECMA-119 timestring '%s' as: %s", + timestring, asctime(&erg)); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); + } + + } else if(strcmp(time_type, "c") == 0) { + xorriso->vol_creation_time= t; + } else if(strcmp(time_type, "m") == 0) { + xorriso->vol_modification_time= t; + } else if(strcmp(time_type, "x") == 0) { + xorriso->vol_expiration_time= t; + } else if(strcmp(time_type, "f") == 0) { + xorriso->vol_effective_time= t; + } else { + + /* >>> unknown time type */; + + ret= 0; goto ex; + } + ret= 1; +ex:; + return(ret); +} + + /* Option -xattr "on"|"off" */ int Xorriso_option_xattr(struct XorrisO *xorriso, char *mode, int flag) { @@ -19771,7 +19925,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "errfile_log","error_behavior","extract","extract_single", "load","logfile", "map","map_single","page","return_with", - "scdbackup_tag","update","update_r", + "scdbackup_tag","update","update_r","volume_date", "" }; static char arg4_commands[][40]= { @@ -20598,6 +20752,10 @@ next_command:; (*idx)++; ret= Xorriso_option_volid(xorriso,arg1,0); + } else if(strcmp(cmd,"volume_date")==0) { + (*idx)+= 2; + ret= Xorriso_option_volume_date(xorriso, arg1, arg2, 0); + } else if(strcmp(cmd,"xattr")==0) { (*idx)++; ret= Xorriso_option_xattr(xorriso, arg1, 0); diff --git a/libisoburn/trunk/xorriso/xorriso.h b/libisoburn/trunk/xorriso/xorriso.h index 63c616e8..d3ae506a 100644 --- a/libisoburn/trunk/xorriso/xorriso.h +++ b/libisoburn/trunk/xorriso/xorriso.h @@ -1004,6 +1004,10 @@ int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag); /* Option -volset_id */ int Xorriso_option_volset_id(struct XorrisO *xorriso, char *name, int flag); +/* Option -volume_date */ +int Xorriso_option_volume_date(struct XorrisO *xorriso, + char *time_type, char *timestring, int flag); + /* Option -xattr "on"|"off" */ int Xorriso_option_xattr(struct XorrisO *xorriso, char *mode, int flag); diff --git a/libisoburn/trunk/xorriso/xorriso.info b/libisoburn/trunk/xorriso/xorriso.info index 02fccd38..bf53089b 100644 --- a/libisoburn/trunk/xorriso/xorriso.info +++ b/libisoburn/trunk/xorriso/xorriso.info @@ -1,5 +1,5 @@ -This is xorriso/xorriso.info, produced by makeinfo version 4.8 from -./xorriso/xorriso.texi. +This is xorriso.info, produced by makeinfo version 4.8 from +./xorriso.texi. INFO-DIR-SECTION Archiving START-INFO-DIR-ENTRY @@ -1786,6 +1786,25 @@ will be written according to the setting of option -acl. are up to 32 characters. This setting gets overridden by image loading. +-volume_date type timestring + Set one of the four overall timestamps for subsequent image + writing. Available types are: + "c" time when the volume was created. + "m" time when volume was last modified. + "x" time when the information in the volume expires. + "f" time since when the volume is effectively valid. + "uuid" sets a timestring that overrides "m" time literally. + It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, + with YYYY between 1970 and 2999. It is supposed to match this + GRUB line: + search -fs-uuid -set YYYY-MM-DD-hh-mm-ss-cc + E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds). + Timestrings for the other types may be given as with option + -alter_date. They are prone to timezone computations. The + timestrings "default" or "overridden" cause default settings: "c" + and "m" will show the current time of image creation. "x" and "f" + will be marked as insignificant. "uuid" will be deactivated. + -out_charset character_set_name Set the character set to which file names get converted when writing an image. See paragraph "Character sets" for more @@ -3557,7 +3576,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -chmod_r sets permissions in ISO image: Manip. (line 70) * -chown sets ownership in ISO image: Manip. (line 42) * -chown_r sets ownership in ISO image: Manip. (line 47) -* -close controls media closing: SetWrite. (line 172) +* -close controls media closing: SetWrite. (line 191) * -close_filter_list bans filter registration: Filter. (line 52) * -commit writes pending ISO image: Writing. (line 13) * -commit_eject writes and ejects: Writing. (line 40) @@ -3577,11 +3596,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -disk_pattern controls pattern expansion: Insert. (line 31) * -drive_class controls drive accessability: Loading. (line 35) * -du show directory size in ISO image: Navigate. (line 84) -* -dummy controls write simulation: SetWrite. (line 161) +* -dummy controls write simulation: SetWrite. (line 180) * -dus show directory size in ISO image: Navigate. (line 88) * -dusx show directory size on disk: Navigate. (line 97) * -dux show directory size on disk: Navigate. (line 92) -* -dvd_obs set write block size: SetWrite. (line 148) +* -dvd_obs set write block size: SetWrite. (line 167) * -eject ejects drive tray: Writing. (line 36) * -end writes pending session and ends program: Scripting. (line 122) * -errfile_log logs problematic disk files: Scripting. (line 84) @@ -3598,12 +3617,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -follow softlinks and mount points: SetInsert. (line 76) * -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 163) * -format formats media: Writing. (line 69) -* -fs sets size of fifo: SetWrite. (line 165) +* -fs sets size of fifo: SetWrite. (line 184) * -getfacl shows ACL in ISO image: Navigate. (line 65) * -getfacl_r shows ACL in ISO image: Navigate. (line 72) * -getfattr shows xattr in ISO image: Navigate. (line 76) * -getfattr_r shows xattr in ISO image: Navigate. (line 80) -* -gid sets global ownership: SetWrite. (line 105) +* -gid sets global ownership: SetWrite. (line 124) * -grow_blindly overides next writeable address: AqDrive. (line 44) * -hardlinks controls handling of hard links: Loading. (line 91) * -help prints help text: Scripting. (line 16) @@ -3643,11 +3662,11 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -not_paths sets absolute exclusion paths: SetInsert. (line 55) * -options_from_file reads commands from file: Scripting. (line 12) * -osirrox enables ISO-to-disk copying: Restore. (line 18) -* -out_charset sets output character set: SetWrite. (line 95) +* -out_charset sets output character set: SetWrite. (line 114) * -outdev aquires a drive for output: AqDrive. (line 29) * -overwrite enables overwriting in ISO: SetInsert. (line 127) * -pacifier controls pacifier text form: Emulation. (line 92) -* -padding sets amount of image padding: SetWrite. (line 178) +* -padding sets amount of image padding: SetWrite. (line 197) * -page set terminal geometry: DialogCtl. (line 15) * -paste_in copies file into disk file: Restore. (line 117) * -path_list inserts paths from disk file: Insert. (line 75) @@ -3687,17 +3706,17 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -setfattr_r sets xattr in ISO image: Manip. (line 123) * -show_stream shows data source and filters: Navigate. (line 153) * -show_stream_r shows data source and filters: Navigate. (line 168) -* -speed set write speed: SetWrite. (line 121) +* -speed set write speed: SetWrite. (line 140) * -split_size enables large file splitting: SetInsert. (line 140) * -status shows current settings: Scripting. (line 25) * -status_history_max curbs -status history: Scripting. (line 34) -* -stdio_sync controls stdio buffer: SetWrite. (line 155) -* -stream_recording controls defect management: SetWrite. (line 136) +* -stdio_sync controls stdio buffer: SetWrite. (line 174) +* -stream_recording controls defect management: SetWrite. (line 155) * -system_id sets system id: SetWrite. (line 88) * -tell_media_space reports free space: Inquiry. (line 74) * -temp_mem_limit curbs memory consumption: Scripting. (line 70) * -toc shows list of sessions: Inquiry. (line 18) -* -uid sets global ownership: SetWrite. (line 101) +* -uid sets global ownership: SetWrite. (line 120) * -update inserts path if different: Insert. (line 99) * -update_l inserts paths if different: Insert. (line 121) * -update_r inserts paths if different: Insert. (line 110) @@ -3705,8 +3724,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -version prints help text: Scripting. (line 19) * -volid sets volume id: SetWrite. (line 52) * -volset_id sets volume set id: SetWrite. (line 71) +* -volume_date sets volume timestamp: SetWrite. (line 95) * -xattr controls handling of xattr (EA): Loading. (line 136) -* -zisofs controls zisofs production: SetWrite. (line 109) +* -zisofs controls zisofs production: SetWrite. (line 128)  File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top @@ -3736,7 +3756,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Character Set, _definition: Charset. (line 6) * Character Set, for input, -in_charset: Loading. (line 73) * Character Set, for input/output, -charset: Charset. (line 43) -* Character Set, for output, -out_charset: SetWrite. (line 95) +* Character Set, for output, -out_charset: SetWrite. (line 114) * Character set, learn from image, -auto_charset: Loading. (line 80) * Character Set, of terminal, -local_charset: Charset. (line 47) * Closed media, _definition: Media. (line 39) @@ -3779,8 +3799,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Filter, show chain, -show_stream: Navigate. (line 153) * Filter, show chains of tree, -show_stream_r: Navigate. (line 168) * Filter, unregister, -unregister_filter: Filter. (line 48) -* Filter, zisofs parameters, -zisofs: SetWrite. (line 109) -* Group, global in ISO image, -gid: SetWrite. (line 105) +* Filter, zisofs parameters, -zisofs: SetWrite. (line 128) +* Group, global in ISO image, -gid: SetWrite. (line 124) * Group, in ISO image, -chgrp: Manip. (line 50) * Group, in ISO image, -chgrp_r: Manip. (line 55) * Growing, _definition: Methods. (line 19) @@ -3793,6 +3813,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Image, set system id, -system_id: SetWrite. (line 88) * Image, set volume id, -volid: SetWrite. (line 52) * Image, set volume set id, -volset_id: SetWrite. (line 71) +* Image, set volume timestamp, -volume_date: SetWrite. (line 95) * Image, show id strings, -pvd_info: Inquiry. (line 78) * Insert, enable overwriting, -overwrite: SetInsert. (line 127) * Insert, file exclusion absolute, -not_paths: SetInsert. (line 55) @@ -3844,7 +3865,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Navigate, tell ISO working directory, -pwd: Navigate. (line 20) * Next writeable address, -grow_blindly: AqDrive. (line 44) * Overwriteable media, _definition: Media. (line 10) -* Ownership, global in ISO image, -uid: SetWrite. (line 101) +* Ownership, global in ISO image, -uid: SetWrite. (line 120) * Ownership, in ISO image, -chown: Manip. (line 42) * Ownership, in ISO image, -chown_r: Manip. (line 47) * Pathspec, _definition: SetInsert. (line 120) @@ -3910,22 +3931,22 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Verify, file checksum, -check_md5: Verify. (line 144) * Verify, file tree checksums, -check_md5_r: Verify. (line 160) * Verify, preset -check_media, -check_media_defaults: Verify. (line 40) -* Write, block size, -dvd_obs: SetWrite. (line 148) +* Write, block size, -dvd_obs: SetWrite. (line 167) * Write, bootability, -boot_image: Bootable. (line 20) -* Write, buffer syncing, -stdio_sync: SetWrite. (line 155) -* Write, close media, -close: SetWrite. (line 172) +* Write, buffer syncing, -stdio_sync: SetWrite. (line 174) +* Write, close media, -close: SetWrite. (line 191) * Write, compliance to specs, -compliance: SetWrite. (line 14) -* Write, defect management, -stream_recording: SetWrite. (line 136) +* Write, defect management, -stream_recording: SetWrite. (line 155) * Write, enable Joliet, -joliet: SetWrite. (line 10) -* Write, fifo size, -fs: SetWrite. (line 165) +* Write, fifo size, -fs: SetWrite. (line 184) * Write, free space, -tell_media_space: Inquiry. (line 74) * Write, log problematic disk files, -errfile_log: Scripting. (line 84) * Write, log written sessions, -session_log: Scripting. (line 104) -* Write, padding image, -padding: SetWrite. (line 178) +* Write, padding image, -padding: SetWrite. (line 197) * Write, pending ISO image, -commit: Writing. (line 13) * Write, predict image size, -print_size: Inquiry. (line 69) -* Write, set speed, -speed: SetWrite. (line 121) -* Write, simulation, -dummy: SetWrite. (line 161) +* Write, set speed, -speed: SetWrite. (line 140) +* Write, simulation, -dummy: SetWrite. (line 180) * xattr, _definiton: Extras. (line 46) * xattr, control handling, -xattr: Loading. (line 136) * xattr, set in ISO image, -setfattr: Manip. (line 110) @@ -3937,57 +3958,57 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top  Tag Table: -Node: Top436 -Node: Overview1340 -Node: Model3217 -Node: Media6097 -Node: Methods8527 -Node: Drives11074 -Node: Extras14340 -Node: Processing17471 -Node: Dialog20967 -Node: Options22624 -Node: AqDrive24192 -Node: Loading27098 -Node: Insert39533 -Node: SetInsert47890 -Node: Manip56457 -Node: CmdFind64333 -Node: Filter72891 -Node: Writing77240 -Node: SetWrite83529 -Node: Bootable92406 -Node: Charset97533 -Node: Exception100287 -Node: DialogCtl104802 -Node: Inquiry107147 -Node: Navigate111287 -Node: Verify118641 -Node: Restore127061 -Node: Emulation133717 -Node: Scripting139743 -Node: Frontend145305 -Node: Examples146506 -Node: ExDevices147675 -Node: ExCreate148157 -Node: ExDialog149431 -Node: ExGrowing150693 -Node: ExModifying151495 -Node: ExBootable151996 -Node: ExCharset152543 -Node: ExPseudo153371 -Node: ExCdrecord154265 -Node: ExMkisofs154580 -Node: ExGrowisofs155583 -Node: ExException156707 -Node: ExTime157161 -Node: ExIncBackup157620 -Node: ExRestore161092 -Node: ExRecovery162061 -Node: Files162626 -Node: Seealso163213 -Node: Legal163737 -Node: CommandIdx164659 -Node: ConceptIdx177887 +Node: Top420 +Node: Overview1324 +Node: Model3201 +Node: Media6081 +Node: Methods8511 +Node: Drives11058 +Node: Extras14324 +Node: Processing17455 +Node: Dialog20951 +Node: Options22608 +Node: AqDrive24176 +Node: Loading27082 +Node: Insert39517 +Node: SetInsert47874 +Node: Manip56441 +Node: CmdFind64317 +Node: Filter72875 +Node: Writing77224 +Node: SetWrite83513 +Node: Bootable93406 +Node: Charset98533 +Node: Exception101287 +Node: DialogCtl105802 +Node: Inquiry108147 +Node: Navigate112287 +Node: Verify119641 +Node: Restore128061 +Node: Emulation134717 +Node: Scripting140743 +Node: Frontend146305 +Node: Examples147506 +Node: ExDevices148675 +Node: ExCreate149157 +Node: ExDialog150431 +Node: ExGrowing151693 +Node: ExModifying152495 +Node: ExBootable152996 +Node: ExCharset153543 +Node: ExPseudo154371 +Node: ExCdrecord155265 +Node: ExMkisofs155580 +Node: ExGrowisofs156583 +Node: ExException157707 +Node: ExTime158161 +Node: ExIncBackup158620 +Node: ExRestore162092 +Node: ExRecovery163061 +Node: Files163626 +Node: Seealso164213 +Node: Legal164737 +Node: CommandIdx165659 +Node: ConceptIdx178960  End Tag Table diff --git a/libisoburn/trunk/xorriso/xorriso.texi b/libisoburn/trunk/xorriso/xorriso.texi index 03242580..4f3a05b0 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 "Apr 06, 2010" +@c man .TH XORRISO 1 "Apr 07, 2010" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -2408,6 +2408,36 @@ System Area in image blocks 0 to 15. Permissible are up to 32 characters. This setting gets overridden by image loading. @c man .TP +@item -volume_date type timestring +@kindex -volume_date sets volume timestamp +@cindex Image, set volume timestamp, -volume_date +Set one of the four overall timestamps for subsequent image writing. +Available types are: +@* +"c" time when the volume was created. +@* +"m" time when volume was last modified. +@* +"x" time when the information in the volume expires. +@* +"f" time since when the volume is effectively valid. +@* +"uuid" sets a timestring that overrides "m" time literally. +@* +It must consist of 16 decimal digits which form YYYYMMDDhhmmsscc, with +YYYY between 1970 and 2999. +It is supposed to match this GRUB line: +@* + search --fs-uuid --set YYYY-MM-DD-hh-mm-ss-cc +@* +E.g. 2010040711405800 is 7 Apr 2010 11:40:58 (+0 centiseconds). +@* +Timestrings for the other types may be given as with option -alter_date. +They are prone to timezone computations. The timestrings "default" or +"overridden" cause default settings: "c" and "m" will show the current time +of image creation. "x" and "f" will be marked as insignificant. +"uuid" will be deactivated. +@c man .TP @item -out_charset character_set_name @kindex -out_charset sets output character set @cindex Character Set, for output, -out_charset diff --git a/libisoburn/trunk/xorriso/xorriso_private.h b/libisoburn/trunk/xorriso/xorriso_private.h index 20d41299..beb62001 100644 --- a/libisoburn/trunk/xorriso/xorriso_private.h +++ b/libisoburn/trunk/xorriso/xorriso_private.h @@ -274,6 +274,15 @@ struct XorrisO { /* the global context of xorriso */ (a simple partition table) */ + /* User settable PVD time stamps */ + time_t vol_creation_time; + time_t vol_modification_time; + time_t vol_expiration_time; + time_t vol_effective_time; + /* To eventually override vol_modification_time by unconverted string + and timezone 0 */ + char vol_uuid[17]; + /* LBA of boot image after image loading */ int loaded_boot_bin_lba; /* Path of the catalog node after image loading */ diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 2003df04..93ba9054 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.04.07.202148" +#define Xorriso_timestamP "2010.04.07.202559" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index 2de6a3e2..d73cad95 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -2013,6 +2013,10 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) } iso_image_set_data_preparer_id(image, xorriso_id); } + isoburn_igopt_set_pvd_times(sopts, + xorriso->vol_creation_time, xorriso->vol_modification_time, + xorriso->vol_expiration_time, xorriso->vol_effective_time, + xorriso->vol_uuid); /* Make final abort check before starting expensive activities */ ret= Xorriso_eval_problem_status(xorriso, 1, 0);