]> git.wh0rd.org - dump.git/commitdiff
Fixed restore of Solaris 7 ufsdump.
authorStelian Pop <stelian@popies.net>
Tue, 27 Jan 2004 10:18:17 +0000 (10:18 +0000)
committerStelian Pop <stelian@popies.net>
Tue, 27 Jan 2004 10:18:17 +0000 (10:18 +0000)
CHANGES
restore/tape.c

diff --git a/CHANGES b/CHANGES
index d75a06574d4301cbdfce66adfbd7b81eddfd26b9..5f171bd89efc96a413d24ecdbb3f3ffb3ca2d1ab 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.237 2004/01/27 10:15:36 stelian Exp $
+$Id: CHANGES,v 1.238 2004/01/27 10:18:17 stelian Exp $
 
 Changes between versions 0.4b35 and 0.4b36 (released ?????????????????)
 =======================================================================
@@ -9,6 +9,11 @@ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????)
 2.     Fixed some warnings (howmany, roundup, powerof2 redefined)
        when compiling against a recent glibc version.
 
+3.     Fixed a bug in restore preventing the read of a dump tape
+       written with Solaris 7 ufsdump. Thanks to Patrick Higgins
+       <phiggins@transzap.com> for reporting the bug and providing 
+       the test case.
+
 Changes between versions 0.4b34 and 0.4b35 (released December 21, 2003)
 =======================================================================
 
index eca001d8aedcd1cf1556e38de43f0822728fd0dd..e82b780aeb9ebd12851ed0e3b35132cf627b371a 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.76 2003/11/22 16:52:16 stelian Exp $";
+       "$Id: tape.c,v 1.77 2004/01/27 10:18:17 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -413,13 +413,19 @@ setup(void)
                dump_ino_t oldmaxino = maxino;
                maxino += (spcl.c_count * TP_BSIZE * NBBY) + 1;
                resizemaps(oldmaxino, maxino);
+               map = usedinomap;
 
                spcl.c_dinode.di_size = spcl.c_count * TP_BSIZE;
                getfile(xtrmap, xtrmapskip);
        }
        Dprintf(stdout, "maxino = %lu\n", (unsigned long)maxino);
-       if (spcl.c_type != TS_BITS)
+       if (spcl.c_type != TS_BITS) {
+               if (spcl.c_type == TS_END) {
+                       msg("Cannot find file dump list, assuming empty tape\n");
+                       exit(0);
+               }
                errx(1, "Cannot find file dump list");
+       }
        map = calloc((unsigned)1, (unsigned)howmany(maxino, NBBY));
        if (map == (char *)NULL)
                errx(1, "no memory for file dump list");