]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
dumpe2fs: fix printing of block offsets for 64-bit file systems
authorTheodore Ts'o <tytso@mit.edu>
Tue, 3 Dec 2013 02:51:24 +0000 (21:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 3 Dec 2013 02:51:24 +0000 (21:51 -0500)
Use ext2fs_group_first_block2() instead of ext2fs_group_first_block()
to avoid dumpe2fs from printing crazy block offsets when we have block
numbers which are larger than 32 bits.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/dumpe2fs.c

index 2ba177146dd52799f5f04efa623fb5caa5c80a24..2464100e16a2b355f8438bfc8c96ca0c3c8f6b7d 100644 (file)
@@ -146,7 +146,7 @@ static void print_bg_rel_offset(ext2_filsys fs, blk64_t block, int itable,
                   EXT4_FEATURE_INCOMPAT_FLEX_BG) {
                dgrp_t flex_grp = ext2fs_group_of_blk2(fs, block);
                printf(" (bg #%u + %u)", flex_grp,
-                      (unsigned)(block-ext2fs_group_first_block(fs,flex_grp)));
+                      (unsigned)(block-ext2fs_group_first_block2(fs,flex_grp)));
        }
 }