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:
parent
016baf9984
commit
1a7ab679cd
@ -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.abstract_file_id, abstract_file_id, 37);
|
||||||
strncpy_pad((char*)vol.bibliographic_file_id, biblio_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,
|
iso_datetime_17(vol.vol_creation_time, t->vol_creation_time,
|
||||||
t->always_gmt);
|
t->always_gmt);
|
||||||
else
|
else
|
||||||
|
@ -313,8 +313,8 @@ struct iso_write_opts {
|
|||||||
time_t vol_modification_time;
|
time_t vol_modification_time;
|
||||||
time_t vol_expiration_time;
|
time_t vol_expiration_time;
|
||||||
time_t vol_effective_time;
|
time_t vol_effective_time;
|
||||||
/* To eventually override vol_modification_time by unconverted string
|
/* To eventually override vol_creation_time and vol_modification_time
|
||||||
* and timezone 0
|
* by unconverted string with timezone 0
|
||||||
*/
|
*/
|
||||||
char vol_uuid[17];
|
char vol_uuid[17];
|
||||||
|
|
||||||
@ -537,8 +537,8 @@ struct ecma119_image
|
|||||||
time_t vol_modification_time;
|
time_t vol_modification_time;
|
||||||
time_t vol_expiration_time;
|
time_t vol_expiration_time;
|
||||||
time_t vol_effective_time;
|
time_t vol_effective_time;
|
||||||
/* To eventually override vol_modification_time by unconverted string
|
/* To eventually override vol_creation_time and vol_modification_time
|
||||||
* and timezone 0
|
* by unconverted string with timezone 0
|
||||||
*/
|
*/
|
||||||
char vol_uuid[17];
|
char vol_uuid[17];
|
||||||
};
|
};
|
||||||
|
@ -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."
|
* When "the information in the volume may be used."
|
||||||
* A value of 0 means that not such retention is intended.
|
* A value of 0 means that not such retention is intended.
|
||||||
* @param uuid
|
* @param uuid
|
||||||
* If this text is not empty, then it overrides vol_modification_time
|
* If this text is not empty, then it overrides vol_creation_time and
|
||||||
* by copying the first 16 decimal digits from uuid, eventually
|
* vol_modification_time by copying the first 16 decimal digits from
|
||||||
* padding up with decimal '1', and writing a NUL-byte as timezone.
|
* uuid, eventually padding up with decimal '1', and writing a NUL-byte
|
||||||
* Other than with vol_modification_time the resulting string in the ISO
|
* as timezone.
|
||||||
* image is fully predictable and free of timezone pitfalls.
|
* 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
|
* It should express a reasonable time in form YYYYMMDDhhmmsscc
|
||||||
* E.g.: "2010040711405800" = 7 Apr 2010 11:40:58 (+0 centiseconds)
|
* E.g.: "2010040711405800" = 7 Apr 2010 11:40:58 (+0 centiseconds)
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user