]> git.wh0rd.org - dump.git/blobdiff - dump/traverse.c
Made explicit in the dump man page that dump will not create
[dump.git] / dump / traverse.c
index 2613b5ef5d68b54c1544bfd89ab29359942230ce..2142abc0c274d5c481dee154556c7909c28fa1ef 100644 (file)
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -41,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.52 2002/12/09 10:53:59 stelian Exp $";
+       "$Id: traverse.c,v 1.56 2003/10/26 16:05:47 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -134,6 +130,17 @@ typedef ino_t ext2_ino_t;
 #ifndef EXT2_RESIZE_INO
 #define EXT2_RESIZE_INO                        7
 #endif
+#ifndef EXT2_FT_UNKNOWN
+#define EXT2_FT_UNKNOWN                0
+#define EXT2_FT_REG_FILE       1
+#define EXT2_FT_DIR            2
+#define EXT2_FT_CHRDEV         3
+#define EXT2_FT_BLKDEV         4
+#define EXT2_FT_FIFO           5
+#define EXT2_FT_SOCK           6
+#define EXT2_FT_SYMLINK                7
+#define EXT2_FT_MAX            8
+#endif
 
 int dump_fs_open(const char *disk, ext2_filsys *fs)
 {
@@ -1231,7 +1238,7 @@ dumpmap(char *map, int type, dump_ino_t ino)
                writerec(cp, 0);
 }
 
-#if defined __linux__ && !defined(int32_t)
+#if defined(__linux__) && !defined(int32_t)
 #define int32_t __s32
 #endif
 
@@ -1304,7 +1311,7 @@ getino(dump_ino_t inum)
 /*
  * Read a chunk of data from the disk.
  * Try to recover from hard errors by reading in sector sized pieces.
- * Error recovery is attempted at most breademax times before seeking
+ * Error recovery is attempted at most BREADEMAX times before seeking
  * consent from the operator to continue.
  */
 int    breaderrors = 0;
@@ -1346,7 +1353,7 @@ loop:
        else
                msg("short read error from %s: [block %d, ext2blk %d]: count=%d, got=%d\n",
                        disk, blkno, dbtofsb(sblock, blkno), size, cnt);
-       if (++breaderrors > breademax) {
+       if (breademax && ++breaderrors > breademax) {
                msg("More than %d block read errors from %d\n",
                        breademax, disk);
                broadcast("DUMP IS AILING!\n");