If --one-file-system is given and a
directory is found to be on another device, *and* this directory
is explicitely given in the command line, then do not omit it.
(gid_to_chars, major_to_chars, minor_to_chars)
(mode_to_chars, off_to_chars, size_to_chars, time_to_chars)
(uid_to_chars, uintmax_to_chars): Return bool
(to_chars): Return bool
(start_header): Check return values of convertion routines. Fail
if unable to store data in the header.
Following the discussion with Karl Berry,
discontinue using @value{} substitutions for Texinfo commands.
Properly index all long options. Print a
separate long option index.
Fix restoring of directory timestamps from
incremental archives.
(directories_first): New variable.
(prepare_to_extract): Set directories_first
(extract_archive): Call apply_nonancestor_delayed_set_stat() only
if not extracting from an incremental archive
Paul Eggert [Thu, 1 Dec 2005 00:18:05 +0000 (00:18 +0000)]
* doc/tar.texi (Option Summary): Rewrite the
--atime-preserve=system description in response to Ian Turner's
proposed patch.
* doc/tar.texi (Extracting Specific Files): Remove obsolescent
FIXME.
Paul Eggert [Tue, 29 Nov 2005 19:14:21 +0000 (19:14 +0000)]
* NEWS: New option --atime-preserve=system, which uses O_NOATIME.
* configure.ac: Prefer AC_CHECK_HEADERS_ONCE to AC_CHECK_HEADERS.
Check for stropts.h and sys/filio.h too, for _FIOSATIME.
* doc/tar.texi: Change "modification time" to "data modification
time", "change time" to "status change time", and "filesystem" to
"file system", so that we use terminology consistent with POSIX.
Use American spacing rather than French for sentence ends.
"non-dependable" -> "undependable".
(Option Summary, Attributes): Explain better the pitfalls of the
--atime-preserve option, and suggest read-only mounts,loopback
mounts, and noatime mounts for older systems.
* doc/value.texi (op-atime-preserve-system): Renamed from
op-atime-preserver-system to fix a misspelling.
* src/common.h (enum atime_preserve): Use lower case for enum values.
* src/compare.c: Don't include utimens.h; no longer needed.
(diff_file): Use set_file_atime rather than utimens; avoid closing
diff_handle until after this, so that we can set the file time stamp
via the file descriptor rather than via its name.
* src/create.c: Don't include utimens.h; no longer needed.
(dump_regular_finish): Remove. All callers now do its work inline.
(dump_dir): New arg FD. All callers changed.
Use fdsavedir rather than savedir.
(unknown_file_error): Arg is a const pointer now.
(dump_file0): 2nd arg is a const pointer now.
Treat directories more like files, with respect to --atime-preserve.
For example, also warn if a directory changes while we are dumping it.
Prefer file descriptors to file names when retrieving/setting file
attributes; this saves path-resolution time and allows us to avoid
changing mtime/ctime on Solaris when restoring atime as root.
Use O_DIRECTORY when opening directories, to avoid some race conditions.
Do not reset atime if mtime has changed. Report an error if
we cannot reset atime.
First cut at adding support for --atime-preserve=system.
* doc/tar.texi (Option Summary): First cut at documenting it.
All other uses of --atime-preserve changed to --atime-preserve=replace.
* doc/value.texi (op-atime-preserve-replace, op-atime-preserver-system):
New.
(op-atime-preserve): Mention METHOD.
* src/common.h (atime_preserve): New enum.
(atime_preserve_option): Now of the enum type rather than bool.
All uses changed.
* src/compare.c (diff_file): Read with O_NOATIME if asked for.
* src/create.c (dump_file0): Read regular and CTG files with O_NOATIME
if asked for.
* src/tar.c (usage): Mention new usage.
(parse_opt): Parse new usage.
(xheader_format_name): Remove static
qualifier. Change last argument.
Correct buffer size calculation (allocated too much space).
(xheader_write): Increase global_header_count here ...
(xheader_write_global): ... instead of here
(flush_write,flush_read): Change data type.
(flush_archive): Compute actual buffer fill level before calling
low level function.
(close_archive): Call flush_archive again if the first call
resulted in partially filled buffer.
(try_new_volume): Rewritten handling of initial headers.
(add_chunk_header): New function. Write an additional header
before the continuation chunk. The purpose of the header is to
allow third-party tars to extract the member.
(simple_flush_write): Take an argument.
(_gnu_flush_write): Correctly handle partially filled buffers.
(try_new_volume): Bugfix. Always check
continued_file_name. If it is absent, the volume is out
of sync.
(add_multi_volume_header): Create GNU.volume.filename keyword in
the extended header.
(save_name,save_sizeleft,save_totsize): Remove
globals.
(volume_label,continued_file_name,continued_file_size): New
variables.
(flush_read,flush_write): Pointers to functions
(mv_begin,mv_end,mv_total_size,mv_size_left): New functions
(write_extended): New function.
Rewritten in a more modular fashion to provide
GNU extensions (multi-volume archives and archive labels) in
pax format.
(volume_label,continued_file_name,continued_file_size)
(continued_file_offset): New globals.
(save_name,save_totsize,save_sizeleft): Make static
(mv_begin,mv_end,mv_total_size,mv_size_left): New functions
(open_archive,flush_write,flush_read): Rewritten