]> git.wh0rd.org - dump.git/commitdiff
'filetype' feature bug when dumping huge filesystems.
authorStelian Pop <stelian@popies.net>
Sun, 9 Jan 2000 23:47:29 +0000 (23:47 +0000)
committerStelian Pop <stelian@popies.net>
Sun, 9 Jan 2000 23:47:29 +0000 (23:47 +0000)
CHANGES
THANKS
dump/traverse.c

diff --git a/CHANGES b/CHANGES
index d4ab15f7e918c60e6fc88548cca279f8efca1d52..7739610229d0fc9b305d0f7ca7b842fd62114594 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.32 2000/01/09 23:40:10 tiniou Exp $
+$Id: CHANGES,v 1.33 2000/01/09 23:47:29 tiniou Exp $
 
 Changes between versions 0.4b12 and 0.4b13 (released ???????????????)
 =====================================================================
@@ -10,6 +10,11 @@ Changes between versions 0.4b12 and 0.4b13 (released ???????????????)
        spec file. Thanks to Christian Weisgerber 
        <naddy@mips.rhein-neckar.de> for submitting this.
 
+3.     Fix a bug in dump related to the 'filetype' feature of ext2fs,
+       causing dump to block when dumping really huge filesystems.
+       Many thanks to Patrik Schindler <poc@pocnet.net> for 
+       helping me find this bug.
+
 Changes between versions 0.4b11 and 0.4b12 (released January 8, 2000)
 =====================================================================
 
diff --git a/THANKS b/THANKS
index 58bd08e130a0e2a18185d7fb3e7d2abd0965c2db..1f71a09588aed6fada3f1ef90981b16c10ad9fdf 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.16 2000/01/08 10:00:39 tiniou Exp $
+$Id: THANKS,v 1.17 2000/01/09 23:47:29 tiniou Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -53,3 +53,4 @@ Theodore Y. Ts'o      tytso@mit.edu
 Stephen Tweedie                sct@dcs.ed.ac.uk
 Daniel Veillard                Daniel.Veillard@imag.fr
 Jason Venner           jason@idiom.com
+Christian Weisgerber   naddy@mips.rhein-neckar.de
index a95a21e1be07da8a6d1244db0c89822cbfe2a896..9c275c1a1d4934a658943151c9118c82f8c084ba 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.11 1999/12/05 18:21:23 tiniou Exp $";
+       "$Id: traverse.c,v 1.12 2000/01/09 23:47:33 tiniou Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -283,9 +283,9 @@ mapfilesindir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *bu
        dp = getino(dirent->inode);
        mode = dp->di_mode & IFMT;
        if (mode == IFDIR && dp->di_nlink != 0 && dp->di_dtime == 0) {
-               if ((dirent->name[0] != '.' || dirent->name_len != 1) &&
+               if ((dirent->name[0] != '.' || ( dirent->name_len & 0xFF ) != 1) &&
                    (dirent->name[0] != '.' || dirent->name[1] != '.' ||
-                    dirent->name_len != 2)) {
+                    ( dirent->name_len & 0xFF ) != 2)) {
                retval = ext2fs_dir_iterate(fs, ino, 0, NULL,
                                            mapfilesindir, private);
                if (retval)
@@ -516,9 +516,9 @@ searchdir(struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void
        if (dp->inode == 0)
                return 0;
        if (dp->name[0] == '.') {
-               if (dp->name_len == 1)
+               if (( dp->name_len & 0xFF ) == 1)
                        return 0;
-               if (dp->name[1] == '.' && dp->name_len == 2)
+               if (dp->name[1] == '.' && ( dp->name_len & 0xFF ) == 2)
                        return 0;
        }
        if (mdc->nodump) {