Extended effect of iso_write_opts_set_pvd_times() parameter uuid to

creation time, to keep it consistent with modification time.
This commit is contained in:
Thomas Schmitt 2010-04-14 12:00:43 +02:00
parent 016baf9984
commit 1a7ab679cd
3 changed files with 20 additions and 10 deletions

View File

@ -438,7 +438,16 @@ int ecma119_writer_write_vol_desc(IsoImageWriter *writer)
strncpy_pad((char*)vol.abstract_file_id, abstract_file_id, 37);
strncpy_pad((char*)vol.bibliographic_file_id, biblio_file_id, 37);
if (t->vol_creation_time > 0)
if (t->vol_uuid[0]) {
for(i = 0; i < 16; i++)
if(t->vol_uuid[i] < '0' || t->vol_uuid[i] > '9')
break;
else
vol.vol_creation_time[i] = t->vol_uuid[i];
for(; i < 16; i++)
vol.vol_creation_time[i] = '1';
vol.vol_creation_time[16] = 0;
} else if (t->vol_creation_time > 0)
iso_datetime_17(vol.vol_creation_time, t->vol_creation_time,
t->always_gmt);
else

View File

@ -313,8 +313,8 @@ struct iso_write_opts {
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
/* To eventually override vol_creation_time and vol_modification_time
* by unconverted string with timezone 0
*/
char vol_uuid[17];
@ -537,8 +537,8 @@ struct ecma119_image
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
/* To eventually override vol_creation_time and vol_modification_time
* by unconverted string with timezone 0
*/
char vol_uuid[17];
};

View File

@ -1733,11 +1733,12 @@ int iso_write_opts_set_system_area(IsoWriteOpts *opts, char data[32768],
* When "the information in the volume may be used."
* A value of 0 means that not such retention is intended.
* @param uuid
* If this text is not empty, then it overrides vol_modification_time
* by copying the first 16 decimal digits from uuid, eventually
* padding up with decimal '1', and writing a NUL-byte as timezone.
* Other than with vol_modification_time the resulting string in the ISO
* image is fully predictable and free of timezone pitfalls.
* If this text is not empty, then it overrides vol_creation_time and
* vol_modification_time by copying the first 16 decimal digits from
* uuid, eventually padding up with decimal '1', and writing a NUL-byte
* as timezone.
* Other than with vol_*_time the resulting string in the ISO image
* is fully predictable and free of timezone pitfalls.
* It should express a reasonable time in form YYYYMMDDhhmmsscc
* E.g.: "2010040711405800" = 7 Apr 2010 11:40:58 (+0 centiseconds)
*