Commit Graph

36 Commits

Author SHA1 Message Date
Sergey Poznyakoff
6d1e9ab67e Remove second argument from calls to name_scan 2006-06-20 15:13:30 +00:00
Sergey Poznyakoff
288315211a Update invocations of name_scan. 2005-12-14 12:58:56 +00:00
Paul Eggert
57c2124d68 * src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
(tar_timespec_cmp): New function. Wrapper over
timespec_cmp using the timespec precision provided by the
current archive format.
* src/common.h (tar_timespec_cmp): New declaration.
* src/compare.c (diff_file): Use tar_timespec_cmp.
* src/extract.c (file_newer_p): Likewise.
* src/update.c (update_archive): Likewise.
* tests/truncate.at: Reverted changes
* tests/update.at: Reverted changes
2005-11-08 07:20:02 +00:00
Paul Eggert
3209329337 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.
2005-09-17 06:41:55 +00:00
Paul Eggert
120e96c480 Update FSF postal mail address. 2005-05-15 03:59:08 +00:00
Sergey Poznyakoff
7347b4f5d5 Started merging with cpio into paxutils. 2004-09-06 14:28:55 +00:00
Sergey Poznyakoff
ebdf1bc7a6 Determine type of the archive before appending to it. 2004-05-19 14:27:41 +00:00
Sergey Poznyakoff
463d99453f Fix improper use of 'path' word 2004-05-16 20:50:55 +00:00
Paul Eggert
2bda83b48d Merge recent gnulib changes, and remove some lint. 2004-04-05 02:29:18 +00:00
Sergey Poznyakoff
eff25ef359 (update_archive): Write global extended header if constructed. 2004-02-20 15:33:12 +00:00
Sergey Poznyakoff
67d29a4d60 Minor changes 2004-02-17 13:33:14 +00:00
Sergey Poznyakoff
bda7d59010 (time_to_start_writing): Changed data type. 2004-01-03 22:26:30 +00:00
Sergey Poznyakoff
91b2d65e9d Use ngettext where appropriate. 2003-09-05 13:24:15 +00:00
Paul Eggert
df06a57b8c (update_archive): Abort if HEADER_SUCCESS_EXTENDED occurs,
as it's not possible.
Pass false to read_header, not 0.
2003-09-03 06:20:41 +00:00
Sergey Poznyakoff
518748f939 Use current_stat_info 2003-08-31 22:55:21 +00:00
Paul Eggert
ec63030958 (update_archive): Pass 0 to read_header. 2001-09-22 00:47:09 +00:00
Paul Eggert
2f04b655d8 (update_archive): Use skip_member. 2000-10-24 06:18:37 +00:00
Paul Eggert
ba2ef4d075 Update copyright year. 2000-01-07 23:02:32 +00:00
Paul Eggert
db3693939d (append_file): Use error message functions to report errors consistently. 2000-01-07 19:25:23 +00:00
Paul Eggert
a78ab36e1e (<quotearg.h>): New include.
(append_file):
Don't assume that gettext preserves errno.
Quote arbitrary strings in diagnostics.
Check for close error.
1999-12-13 05:11:05 +00:00
Paul Eggert
a46a204436 (update_archive): Fix typo: last two args to dump_file were interchanged. 1999-10-11 06:56:17 +00:00
Paul Eggert
e6d8e9279f (update_archive): Remove call to name_expand; had no effect.
Use chdir_do to change into directory.
Use deref_stat instead of stat.
Use add_avoided_name to mark names to be avoided; the old method of
setting a bit with the name caused all descendants of that name to
be avoided, in some circumstances.
1999-09-24 23:44:52 +00:00
Paul Eggert
cc9d6c88f9 Lint removal. 1999-08-23 09:55:55 +00:00
Paul Eggert
9d68ac2e94 (update_archive): excluded_pathname -> excluded_name. 1999-08-11 13:43:15 +00:00
Paul Eggert
8ae9f94ce2 (update_archive): Exclude pathnames if any of their components are excluded. 1999-07-17 01:49:35 +00:00
Paul Eggert
4dd9bd50bd (append_file): Open the file before statting it, to avoid a race.
Complain about file shrinkage only when we reach EOF.
1999-07-12 13:03:58 +00:00
Paul Eggert
d46735235b Rename full_read to safe_read. 1999-07-05 06:47:59 +00:00
Paul Eggert
6290150c47 Fix copyright notice. 1999-07-01 21:01:44 +00:00
Paul Eggert
1521a94b11 Handle EINTR correctly; use STDIN_FILENO instead of 0, etc. 1999-06-29 02:26:25 +00:00
Paul Eggert
ac65803ac9 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
(update_archive): Cast -1 to dev_t when necessary.
1997-10-31 00:58:55 +00:00
Paul Eggert
eed93f9a58 GNU tar 1.12 1997-04-19 22:44:12 +00:00
François Pinard
276133e431 *** empty log message *** 1994-11-16 02:38:42 +00:00
François Pinard
a8463021e8 *** empty log message *** 1994-11-16 02:38:40 +00:00
François Pinard
066ced907a *** empty log message *** 1994-11-16 02:38:37 +00:00
François Pinard
1a0228ab1e *** empty log message *** 1994-11-16 02:38:35 +00:00
François Pinard
4356a8387b Initial revision 1994-11-16 02:38:33 +00:00