From: Theodore Ts'o Date: Fri, 6 May 2005 02:55:20 +0000 (-0400) Subject: Fix a bug in filefrag so that it doesn't when the first block found is an X-Git-Tag: E2FSPROGS-1_38-WIP-0509~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfd9762de631e312c3d982ca7389fcd06547b581;p=thirdparty%2Fe2fsprogs.git Fix a bug in filefrag so that it doesn't when the first block found is an indirect block, it doesn't falsely count an extra discontunity. (Addresses Debian Bug #307607). --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 6f8d9fce9..afb3b74c1 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +2005-05-05 Theodore Ts'o + + * filefrag.c (frag_report): Fix so that when the first block to be + found is an indirect block, we don't falsely count an + extra discontinuity. (Addresses Debian Bug: #307607) + 2005-04-16 Theodore Ts'o * badblocks.8.in, dumpe2fs.8.in, fsck.8.in, tune2fs.8.in: Fix diff --git a/misc/filefrag.c b/misc/filefrag.c index ea74028bd..5364125c1 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -127,7 +127,7 @@ static void frag_report(const char *filename) get_bmap(fd, 0), get_bmap(fd, numblocks - 1)); } for (i=0; i < numblocks; i++) { - if (is_ext2) { + if (is_ext2 && last_block) { if (((i-EXT2_DIRECT) % bpib) == 0) last_block++; if (((i-EXT2_DIRECT-bpib) % (bpib*bpib)) == 0)