]> git.wh0rd.org - dump.git/blobdiff - dump/traverse.c
Exclude directory entries to non-dumped inodes from the dump.
[dump.git] / dump / traverse.c
index 41047999c7d921c07237655e50db09f3840136b3..9e68fdd596fbb16df9b6952062f59ec250142cd6 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.61 2004/07/01 09:14:49 stelian Exp $";
+       "$Id: traverse.c,v 1.62 2004/11/22 10:22:43 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -985,6 +985,11 @@ convert_dir(struct ext2_dir_entry *dirent, UNUSED(int offset),
        struct direct *dp;
        int reclen;
 
        struct direct *dp;
        int reclen;
 
+       /* do not save entries to excluded inodes */
+       if (TSTINO(dirent->inode, dumpinomap) == 0 &&
+           TSTINO(dirent->inode, dumpdirmap) == 0)
+               return 0;
+
        p = (struct convert_dir_context *)private;
 
        reclen = EXT2_DIR_REC_LEN((dirent->name_len & 0xFF) + 1);
        p = (struct convert_dir_context *)private;
 
        reclen = EXT2_DIR_REC_LEN((dirent->name_len & 0xFF) + 1);