]> git.wh0rd.org - dump.git/commitdiff
Fixed negative size displays in restore
authorStelian Pop <stelian@popies.net>
Mon, 16 Aug 2004 09:39:45 +0000 (09:39 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 16 Aug 2004 09:39:45 +0000 (09:39 +0000)
CHANGES
restore/tape.c

diff --git a/CHANGES b/CHANGES
index f71dc06943669fed74e7a607f93cd6612dc551a0..0d7cd0504217624a45b78cb0faf5d0c8b9b712b1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.256 2004/07/20 15:52:58 stelian Exp $
+$Id: CHANGES,v 1.257 2004/08/16 09:39:45 stelian Exp $
 
 Changes between versions 0.4b37 and 0.4b38 (released ????????????)
 ==================================================================
 
 Changes between versions 0.4b37 and 0.4b38 (released ????????????)
 ==================================================================
@@ -9,6 +9,10 @@ Changes between versions 0.4b37 and 0.4b38 (released ????????????)
 2.     Made restore use either libncurses or libtermcap, depending
        on which one is available at configure time.
 
 2.     Made restore use either libncurses or libtermcap, depending
        on which one is available at configure time.
 
+3.     Fixed restore negative size display bug when comparing a
+       dump containing files over 2GB. Thanks to Steve Bonds
+       <sbonds@users.sourceforge.net> for the bug report.
+
 Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004)
 ==================================================================
 
 Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004)
 ==================================================================
 
index 2f344dbc85e87785dc3629c44ce690ee105c13e1..29807646f2aa01ba4133ecb9b688babfe712d0b8 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.81 2004/05/25 10:39:31 stelian Exp $";
+       "$Id: tape.c,v 1.82 2004/08/16 09:39:47 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -1426,7 +1426,7 @@ xtrcmpskip(UNUSED(char *buf), size_t size)
 
 #if !COMPARE_ONTHEFLY
 static int
 
 #if !COMPARE_ONTHEFLY
 static int
-do_cmpfiles(int fd_tape, int fd_disk, long size)
+do_cmpfiles(int fd_tape, int fd_disk, OFF_T size)
 {
        static char buf_tape[BUFSIZ];
        static char buf_disk[BUFSIZ];
 {
        static char buf_tape[BUFSIZ];
        static char buf_disk[BUFSIZ];
@@ -1475,8 +1475,8 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk)
 
        if (sbuf_disk->st_size != sbuf_tape.st_size) {
                fprintf(stderr,
 
        if (sbuf_disk->st_size != sbuf_tape.st_size) {
                fprintf(stderr,
-                       "%s: size changed from %ld to %ld.\n",
-                       diskfile, (long)sbuf_tape.st_size, (long)sbuf_disk->st_size);
+                       "%s: size changed from %lld to %lld.\n",
+                       diskfile, (long long)sbuf_tape.st_size, (long long)sbuf_disk->st_size);
                do_compare_error;
 #ifdef COMPARE_FAIL_KEEP_FILE
                return (0);
                do_compare_error;
 #ifdef COMPARE_FAIL_KEEP_FILE
                return (0);
@@ -1568,8 +1568,8 @@ comparefile(char *name)
                return;
        }
 
                return;
        }
 
-       Vprintf(stdout, "comparing %s (size: %ld, mode: 0%o)\n", name,
-               (long)sb.st_size, mode);
+       Vprintf(stdout, "comparing %s (size: %lld, mode: 0%o)\n", name,
+               (long long)sb.st_size, mode);
 
        if (sb.st_mode != mode) {
                fprintf(stderr, "%s: mode changed from 0%o to 0%o.\n",
 
        if (sb.st_mode != mode) {
                fprintf(stderr, "%s: mode changed from 0%o to 0%o.\n",