1992b53b8c(tar_sparse_init): Fill structure with zeros. Call sparse_select_optab(). All callers updated. (sparse_member_p, sparse_fixup_header): Use tar_sparse_init().
Sergey Poznyakoff
2005-06-25 09:13:01 +00:00
44ce72fa96Adapt to the new output format
Sergey Poznyakoff
2005-06-23 12:57:18 +00:00
2e9ea5f4a7(pax_sparse_member_p): Checking member size vs. file size is not reliable enough. Use sparse_map_avail.
Sergey Poznyakoff
2005-06-23 12:57:07 +00:00
225e690142(sparse_scan_file): Fix another bug, introduced yesterday: Initialize archive_file_size to 0. The variable keeps size of the file *as stored in the archive*, not the size reported by stat.
Sergey Poznyakoff
2005-06-23 09:10:28 +00:00
040b5ab5f9A sweep of the sparse code prompted by a bug report by Jim Meyering. * src/sparse.c: Include <inttostr.h>. (struct tar_sparse_file): offset and dumped_size are off_t, not size_t. optab is now const *. (dump_zeros): Return bool success flag, not off_t. All callers changed. Use a constant-zero buffer rather than clearing a buffer each time. Don't mess up if write fails. (dump_zeros, check_sparse_region): Don't assume off_t is no wider than size_t. (tar_sparse_init): Don't bother clearing a field that is already clear. (zero_block_p): First arg is const *, not *. (clear_block, SPARSES_INIT_COUNT): Remove. (sparse_add_map): First arg is now struct start_stat_info *, not struct tar_sparse_file *. All callers changed. Use x2nrealloc to check for size_t overflow. (parse_scan_file): Cache commonly-used parts of file. Use an auto buffer, not a static one. Don't bother clearing the buffer; not needed. Don't bother clearing items that are already clear. (oldgnu_optab, star_optab, pax_optab): Now const. (sparse_dump_region): Don't bother clearing the buffer before reading into it; just clear the parts that aren't read into. (sparse_dump_file): Clear the whole local variable 'file'. (diff_buffer): Remove; now a local var. (check_sparse_region): Don't bother clearing buffer before reading into it. Don't assume off_t is promoted to long. (oldgnu_get_sparse_info, star_get_sparse_info): Use an auto status, not static. * src/tar.h (struct tar_stat_info): had_trailing_slash is now bool, not int. * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder): Rewrite to avoid cast. (sparse_offset_decoder, sparse_numbytes_decoder): Diagnose excess entries rather than crashing.
Paul Eggert
2005-06-23 06:55:01 +00:00
4f4a858eb6* src/common.h (timespec_lt): Add a return type: bool.
Paul Eggert
2005-06-23 03:19:03 +00:00
d659cbaccdCarefully crafted invalid headers can cause buffer overrun. Invalid header fields go undiagnosed. Some valid time strings are ignored.
Paul Eggert
2005-06-22 06:24:39 +00:00
eb70fd51cb(AC_STRUCT_ST_BLKSIZE,AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
Sergey Poznyakoff
2005-06-13 12:53:25 +00:00
5c4ea58bd7* src/names.c (excluded_name): excluded_filename -> excluded_file_name, because the name was changed in gnulib.
Paul Eggert
2005-06-02 21:02:58 +00:00
77e56f876dDocument new backup scripts behavior
Sergey Poznyakoff
2005-05-26 12:50:43 +00:00
2c49c610be(mt_begin,mt_rewind,mt_offline,mt_status): Use $MT to invoke mt (init_common): Set --rsh-command option for mt if TAPE_FILE is a remote archive.
Sergey Poznyakoff
2005-05-26 12:50:30 +00:00
ca5e64504b(hash_string_hasher,hash_string_compare) (hash_string_insert,hash_string_lookup,removed_prefixes_p) (safer_name_suffix): Moved to paxutils
Sergey Poznyakoff
2005-05-21 23:11:26 +00:00
cc07b9e170Include paxlib.h instead of paxerror.h (safer_name_suffix,removed_prefixes_p): Removed. The functions are imported from paxutils
Sergey Poznyakoff
2005-05-21 23:10:57 +00:00
f2c8b1dff3Update invocations of safer_name_suffix()
Sergey Poznyakoff
2005-05-21 23:10:42 +00:00
9129c846e7Add new paxutils files
Sergey Poznyakoff
2005-05-21 23:09:42 +00:00
dfabe2397aRemove checking for LIB_SETSOCKOPT, it is handled by paxutils
Sergey Poznyakoff
2005-05-19 15:32:56 +00:00
8f1f0955cf(copy_files): Accept optional third argument: a prefix to be appended to destination file names. Import paxutils/paxlib files.
Sergey Poznyakoff
2005-05-19 15:32:38 +00:00
1672258959* src/misc.c (remove_any_file): Fix typo in previous change.
Paul Eggert
2005-05-17 08:34:16 +00:00
c172481f41(remove_any_file): Fix typo in previous change.
Paul Eggert
2005-05-17 08:34:03 +00:00
46f09016e8Port to Solaris 10's treatment of unlinking directories. * gnulib-modules: Add unlinkdir. * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c. * src/common.h (we_are_root): Remove extern decl; it's now static. * src/extract.c (we_are_root): Now static. * src/misc.c: Include <unlinkdir.h>. (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
Paul Eggert
2005-05-15 06:23:49 +00:00
120e96c480Update FSF postal mail address.
Paul Eggert
2005-05-15 03:59:08 +00:00
c9365a1d09New test case
Sergey Poznyakoff
2005-05-12 15:39:54 +00:00
8d064bb816(file_newer_p): Return false if file does not exist
Sergey Poznyakoff
2005-05-12 15:39:34 +00:00
29c902bc49(dump_regular_file): Correctly pad archive members that shrunk during archiving. Repored by Frank Heckenbach.
Sergey Poznyakoff
2005-05-12 15:39:21 +00:00
d78f85d61d(diff_file): diff_handle was not initialized
Sergey Poznyakoff
2005-05-12 15:39:02 +00:00
73be90ea0d(Genfile): New appendix
Sergey Poznyakoff
2005-05-12 15:38:48 +00:00
bb8dcc1e8cUpdate copyright.
Paul Eggert
2005-05-02 08:05:59 +00:00
87bd7f5d1cUpdate copyright.
Paul Eggert
2005-05-02 08:05:23 +00:00
ecac16a4a0* src/incremen.c (hash_directory): Likewise. * src/names.c (hash_string_hasher): Likewise. * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
Paul Eggert
2005-05-02 08:03:02 +00:00
89a4824c73Tell awk to read from /dev/null.
Paul Eggert
2005-05-02 08:02:35 +00:00
9b7c6df82bAdjust to new hash API.
Paul Eggert
2005-05-02 08:02:09 +00:00
e2c431e9c2Adjust to recent gnulib changes.
Paul Eggert
2005-05-02 07:36:26 +00:00
82c746410d(parse_opt): Adjust to new modechange API.
Paul Eggert
2005-05-02 07:36:09 +00:00
2e025f2dea(start_ueader): Adjust to new modechange API.
Paul Eggert
2005-05-02 07:35:47 +00:00
f2e17c0d8c(initial_umask): New var.
Paul Eggert
2005-05-02 07:34:53 +00:00
ed08ef0458Add dup-safer.c, fd-safer.c, unistd-safer.h.
Paul Eggert
2005-05-02 07:34:26 +00:00
27b98aa8ae* src/buffer.c (reading_from_pipe): Remove. All uses removed. (short_read): Don't warn about short reads; they're normal. * tests/shortrec.at: New file. * tests/testsuite.at: Include it.
Paul Eggert
2005-04-18 18:21:50 +00:00
18850a18f1(gnulib_modules): Don't create a file modlist.tmp, as it is sometimes left behind as a garbage file (maybe due to the multiple traps?).
Paul Eggert
2005-04-18 18:14:58 +00:00
005d0d455cUse UTF-8 uniformly, rather than UTF-8 sometimes and Latin-1 sometimes.
Paul Eggert
2005-04-16 07:22:13 +00:00
ee738da4a8Test splittind directory members between the archive volumes.
Sergey Poznyakoff
2005-04-07 17:28:34 +00:00
42e53a98e1Modified to match the new behavior
Sergey Poznyakoff
2005-04-07 17:27:30 +00:00
2d34da98d5Assign orig_file_name to save_name uniformly over the program. This fixes matching directory names at the start of an archive volume.
Sergey Poznyakoff
2005-04-07 17:27:07 +00:00
781d3818e5(diff_init): Read directory file if in listed incremental. This prevents spurious 'Contents differ' diagnostics. (diff_archive): Minor fixes to text messages (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name to save_name uniformly over the program. This fixes matching directory names at the start of an archive volume.
Sergey Poznyakoff
2005-04-07 17:26:42 +00:00
c861b96651(flush_write): Warn when the name of the archive straddling volume boundary is longer than 100 characters. Earlier behavior was to issue a fatal error. (struct zip_magic): Reverted part of changes from 2005-04-04. They make the maintenance too costly. Removing unsigned' qualifier from magic' member should be enough.
Sergey Poznyakoff
2005-04-07 17:26:11 +00:00
2872a5ae81Minor fixes to text messages. Proposed by Benno Schulenberg. (extract_file): Assign orig_file_name to save_name uniformly over the program. This fixes matching directory names at the start of an archive volume.
Sergey Poznyakoff
2005-04-07 17:25:29 +00:00
62599b5285Minor fixes to text messages. Proposed by Benno Schulenberg.
Sergey Poznyakoff
2005-04-07 17:24:56 +00:00
263604c2ecSort and simplify.
Paul Eggert
2005-04-04 18:46:00 +00:00
7ebf107f89Update copyright date.
Paul Eggert
2005-04-04 18:37:52 +00:00
5fe7f641e8Rename config/ to build-aux/.
Paul Eggert
2005-04-04 18:35:53 +00:00
dbf96ec903Spelling fixes.
Paul Eggert
2005-04-04 18:31:44 +00:00
5d87077565* src/buffer.c: Fix struct zip_magic to avoid problems with pedantic C compilers. Make 'magic' const and redo it to save alignment and space.
Paul Eggert
2005-04-04 18:22:44 +00:00
7d4bd5b38d(struct zip_magic): Use char arrays, not pointers. The unsigned char * pointer ran afoul of pedantic C compilers, and we didn't need pointers anyway. Put the size field before the data to avoid unnecessary padding. All uses changed. (magic) Make it const, since it doesn't change. All uses changed.
Paul Eggert
2005-04-04 18:21:55 +00:00
ad0bd3c9c4* src/xheader.c (decode_record): Don't dump core when given a corrupted extended header.
Paul Eggert
2005-04-02 06:39:37 +00:00
95fa3422d7(decode_record): Don't dump core when given a corrupted extended header. Problem reported by Jim Meyering. Also, check for other ways that the header might be invalid, e.g., missing newline at end. Do not allow keys with nulls. Allow blanks before and after length, as POSIX requires. Do not allow leading "-" in length. Check for length overflow. (xheader_decode, xheader_decode_global): Let decode_record check for exhaustion of record. (xheader_read): Null-terminate the extended record; decode_record relies on this.
Paul Eggert
2005-04-02 06:39:19 +00:00
fdbb1d8c7c(restore_fs): Use root_fs
Sergey Poznyakoff
2005-03-03 23:16:03 +00:00
f04c7701faUse `head -n 1'. Provide missing argument to ${MT_STATUS}. Fixed typo in MT_OFFLINE assignment. Proposed by Jan Merka.
Sergey Poznyakoff
2005-03-03 23:14:52 +00:00
63e90fdc62Use `head -n 1'. Provide missing argument to ${MT_STATUS}. Proposed by Jan Merka.
Sergey Poznyakoff
2005-03-03 23:14:23 +00:00