]> Dogcows Code - chaz/tar/commit
Don't filter time stamps through the resolution supported
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Sep 2005 06:41:55 +0000 (06:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Sep 2005 06:41:55 +0000 (06:41 +0000)
commit3209329337c87a102fa12d7eb60a3df323ba56c1
treee5d013a5daa550ffbc9b94226357893e0e89a8b8
parent2f800ce3fb9c38360e1b6dac70ee0d8ceae72c6a
Don't filter time stamps through the resolution supported
by struct stat; keep them to full nanosecond resolution.
This affects behavior only on older hosts or file systems
that have lower-resolution time stamps.
* src/common.h (OLDER_STAT_TIME): Parenthesize arg.
(OLDER_TAR_STAT_TIME): New macro.
(code_timespec): New function.
(BILLION, LOG10_BILLION, TIMESPEC_STRSIZE_BOUND): New constants.
* src/compare.c (diff_file): Use full time stamp resolution.
* src/create.c (start_header, dump_file0): Likewise.
(start_header, dump_file0): Adjust to new structure layout.
(dump_regular_finish): Simplify by using timespec_cmp.
* src/extract.c (struct delayed_set_stat): Don't store stat info
that we don't need, to save space.  All uses changed.
(struct delayed_set_stat, struct delayed_link, file_newer_p):
(create_placeholder_file, extract_link, apply_delayed_links):
Use full time stamp resolution.
(check_time): Use code_timespec rather than rolling our own code.
(set_stat, delay_set_stat): Arg now points to tar_stat_info to
avoid losing time information.  All callers changed.
* src/list.c (read_and, decode_header, print_heaeder):
Use full time stamp resolution.
* src/misc.c (code_timespec): New function.
* src/tar.h (struct tar_stat_info): Record atime, mtime, ctime
separately, for benefit of hosts with lower resolution.
* src/update.c (update_archive): Use full time stamp resolution.
* src/xheader.c (code_time): Use new code_timespec function
to simplify code.
(atime_coder, atime_decoder, ctime_coder, ctime_decoder):
(mtime_coder, mtime_decoder): Use full time stamp resolution.

Report time stamps to full resolution in environment.
Report memory allocation failures rather than ignoring them.
* src/system.c (time_to_env): New function.
(oct_to_env, str_to_env, chr_to_env): Report memory allocation failures.
(stat_to_env): Report full resolution in time stamps.
ChangeLog
src/common.h
src/compare.c
src/create.c
src/extract.c
src/list.c
src/misc.c
src/system.c
src/tar.h
src/update.c
src/xheader.c
This page took 0.024313 seconds and 4 git commands to generate.