X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=dump%2Ftraverse.c;h=ffcac8842cab2c9f4560ef7a5ccf845db26263ba;hp=2a160fa95f31a3ff716ad78bd6a34a49784af95a;hb=b82d31dc01e8474d503a86fbf52ddf6d74c245e6;hpb=6d732772201861bc57348f4ad5c0970ac00b5d93 diff --git a/dump/traverse.c b/dump/traverse.c index 2a160fa..ffcac88 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.36 2001/07/19 09:03:44 stelian Exp $"; + "$Id: traverse.c,v 1.39 2001/11/11 00:06:39 stelian Exp $"; #endif /* not lint */ #include @@ -159,12 +159,9 @@ int dump_fs_open(const char *disk, ext2_filsys *fs) else { if (es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL && - journal_ino) { - msg("Exclude journal inode %u\n", - journal_ino); - do_exclude_ino(journal_ino); - } - do_exclude_ino(EXT2_RESIZE_INO); + journal_ino) + do_exclude_ino(journal_ino, "journal inode"); + do_exclude_ino(EXT2_RESIZE_INO, "resize inode"); } } return retval; @@ -901,8 +898,8 @@ dumpino(struct dinode *dp, dump_ino_t ino) ext2fs_block_iterate2(fs, (ext2_ino_t)ino, 0, NULL, dumponeblock, (void *)&bc); /* deal with holes at the end of the inode */ - if (i_size > bc.next_block*sblock->fs_fsize) { - remaining = i_size - bc.next_block*sblock->fs_fsize; + if (i_size > ((u_quad_t)bc.next_block) * sblock->fs_fsize) { + remaining = i_size - ((u_quad_t)bc.next_block) * sblock->fs_fsize; for (i = 0; i < howmany(remaining, sblock->fs_fsize); i++) { bc.buf[bc.cnt++] = 0; if (bc.cnt == bc.max) { @@ -1242,11 +1239,10 @@ 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; -#define BREADEMAX 32 void bread(daddr_t blkno, char *buf, int size) @@ -1285,9 +1281,9 @@ loop: else msg("short read error from %s: [block %d]: count=%d, got=%d\n", disk, blkno, size, cnt); - if (++breaderrors > BREADEMAX) { + if (++breaderrors > breademax) { msg("More than %d block read errors from %d\n", - BREADEMAX, disk); + breademax, disk); broadcast("DUMP IS AILING!\n"); msg("This is an unrecoverable error.\n"); if (!query("Do you want to attempt to continue?")){