#ifndef lint
static const char rcsid[] =
- "$Id: traverse.c,v 1.37 2001/07/19 09:49:35 stelian Exp $";
+ "$Id: traverse.c,v 1.39 2001/11/11 00:06:39 stelian Exp $";
#endif /* not lint */
#include <config.h>
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) {
/*
* 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)
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?")){