From: Stelian Pop Date: Mon, 16 Aug 2004 09:39:45 +0000 (+0000) Subject: Fixed negative size displays in restore X-Git-Tag: release_0_4b38~9 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7d422735f62ce24de9bc9c9d5033745660a85756;p=dump.git Fixed negative size displays in restore --- diff --git a/CHANGES b/CHANGES index f71dc06..0d7cd05 100644 --- 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 ????????????) ================================================================== @@ -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. +3. Fixed restore negative size display bug when comparing a + dump containing files over 2GB. Thanks to Steve Bonds + for the bug report. + Changes between versions 0.4b36 and 0.4b37 (released July 7, 2004) ================================================================== diff --git a/restore/tape.c b/restore/tape.c index 2f344db..2980764 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #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 @@ -1426,7 +1426,7 @@ xtrcmpskip(UNUSED(char *buf), size_t size) #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]; @@ -1475,8 +1475,8 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk) 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); @@ -1568,8 +1568,8 @@ comparefile(char *name) 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",