X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fincremen.c;h=69805a7f779dc72710865febf85182abc4972636;hb=d659cbaccdc1f3279c49107cf15f15a639738529;hp=77772316c292bbc9239b6ccb926cbeeaafe2b5d5;hpb=68ff77508ca46f0213b646e4577882e42c2ec812;p=chaz%2Ftar diff --git a/src/incremen.c b/src/incremen.c index 7777231..69805a7 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -1,7 +1,7 @@ /* GNU dump extensions to tar. Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, - 2003, 2004 Free Software Foundation, Inc. + 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -15,16 +15,13 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "system.h" +#include #include #include #include #include "common.h" -#define obstack_chunk_alloc xmalloc -#define obstack_chunk_free free -#include /* Incremental dump specialities. */ @@ -53,8 +50,8 @@ static Hash_table *directory_table; #endif /* Calculate the hash of a directory. */ -static unsigned -hash_directory (void const *entry, unsigned n_buckets) +static size_t +hash_directory (void const *entry, size_t n_buckets) { struct directory const *directory = entry; return hash_string (directory->name, n_buckets); @@ -357,6 +354,8 @@ read_directory_file (void) _("Time stamp out of range"))); else { + /* FIXME: This should also input nanoseconds, but that will be a + change in file format. */ newer_mtime_option.tv_sec = t; newer_mtime_option.tv_nsec = 0; } @@ -447,7 +446,9 @@ write_directory_file (void) if (sys_truncate (fileno (fp)) != 0) truncate_error (listed_incremental_option); - fprintf (fp, "%lu\n", (unsigned long) start_time); + /* FIXME: This should also output nanoseconds, but that will be a + change in file format. */ + fprintf (fp, "%lu\n", (unsigned long int) start_time.tv_sec); if (! ferror (fp) && directory_table) hash_do_for_each (directory_table, write_directory_file_entry, fp); if (ferror (fp)) @@ -523,7 +524,7 @@ purge_directory (char const *directory_name) stat_diag (p); WARN((0, 0, _("%s: Not purging directory: unable to stat"), quotearg_colon (p))); - continue; + continue; } else if (one_file_system_option && st.st_dev != root_device) { @@ -532,7 +533,7 @@ purge_directory (char const *directory_name) quotearg_colon (p))); continue; } - + if (! interactive_option || confirm ("delete", p)) { if (verbose_option)