From f75cc889d49eebab28ee47034e875ac0eac114a6 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Mon, 1 Jul 2002 11:54:39 +0000 Subject: [PATCH] Fixed tape size calculation when compression is on. --- CHANGES | 6 +++++- THANKS | 3 ++- dump/tape.c | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 678487d..1d7db59 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.182 2002/06/25 19:00:37 stelian Exp $ +$Id: CHANGES,v 1.183 2002/07/01 11:54:39 stelian Exp $ Changes between versions 0.4b29 and 0.4b30 (released ????????????????) ====================================================================== @@ -11,6 +11,10 @@ Changes between versions 0.4b29 and 0.4b30 (released ????????????????) 2. Fixed a problem in restore when reading tapes written on big endian machines with very old versions of dump. The patch was contributed by George Helffrich . + +3. Fixed the tape length calculation when using large tapes + and compression. Thanks to Georg Lippold + for reporting the bug. Changes between versions 0.4b28 and 0.4b29 (released June 8, 2002) ================================================================== diff --git a/THANKS b/THANKS index 4b20e69..88da77f 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.61 2002/06/25 19:00:37 stelian Exp $ +$Id: THANKS,v 1.62 2002/07/01 11:54:39 stelian Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -60,6 +60,7 @@ Klaus Kudielka kkudielk@cacofonix.nt.tuwien.ac.at Thorsten Kukuk kukuk@suse.de Florian La Roche florian@jurix.jura.uni-sb.de Ambrose Li acli@mingpaoxpress.com +Georg Lippold g_lippold@sourceforge.net Patrick J. LoPresti patl@cag.lcs.mit.edu Greg Lutz greglutz@ix.netcom.com Eric Maisonobe virnet@nat.fr diff --git a/dump/tape.c b/dump/tape.c index 54b387e..c6161be 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.68 2002/05/21 15:48:46 stelian Exp $"; + "$Id: tape.c,v 1.69 2002/07/01 11:54:40 stelian Exp $"; #endif /* not lint */ #include @@ -479,7 +479,7 @@ flushtape(void) blocksthisvol += ntrec; if (!pipeout && !unlimited) { if (blocksperfile) { - if ( compressed ? (bytes_written - tapea_bytes + SLAVES * (writesize + sizeof(struct tapebuf))) >= blocksperfile * 1024 + if ( compressed ? (bytes_written - tapea_bytes + SLAVES * (writesize + sizeof(struct tapebuf))) >= (((long long)blocksperfile) * 1024) : blocksthisvol >= blocksperfile ) { close_rewind(); startnewtape(0); -- 2.39.5