From: Theodore Ts'o Date: Tue, 3 Dec 2013 02:51:24 +0000 (-0500) Subject: dumpe2fs: fix printing of block offsets for 64-bit file systems X-Git-Tag: v1.42.9~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26da661447f1b7cb49864590fc42f405f0d9a328;p=thirdparty%2Fe2fsprogs.git dumpe2fs: fix printing of block offsets for 64-bit file systems 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" --- diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index 2ba177146..2464100e1 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -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))); } }