From: Theodore Ts'o Date: Thu, 23 Dec 2004 18:54:28 +0000 (-0500) Subject: Enhance dumpe2fs so that it will print the location of the reserved X-Git-Tag: E2FSPROGS-1_36~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=35238dd1a5585d042e5f0d478211e9fdfb4873e1;p=thirdparty%2Fe2fsprogs.git Enhance dumpe2fs so that it will print the location of the reserved GDT blocks if they are present. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 9c9d83dca..e040632c2 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-23 Theodore Ts'o + + * dumpe2fs.c (list_desc): If reserved GDT blocks are present, + display them along with the other filesystem meta blocks. + 2004-12-22 Theodore Ts'o * fsck.c (main): Check return from malloc of fsck_path string. diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index da8fdfab8..73042fafe 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -93,7 +93,7 @@ static void list_desc (ext2_filsys fs) blk_t group_blk, next_blk; blk_t super_blk, old_desc_blk, new_desc_blk; char *block_bitmap=NULL, *inode_bitmap=NULL; - int inode_blocks_per_group, old_desc_blocks; + int inode_blocks_per_group, old_desc_blocks, reserved_gdt; int has_super; if (fs->block_map) @@ -105,6 +105,7 @@ static void list_desc (ext2_filsys fs) EXT2_INODE_SIZE(fs->super)) + EXT2_BLOCK_SIZE(fs->super) - 1) / EXT2_BLOCK_SIZE(fs->super); + reserved_gdt = fs->super->s_reserved_gdt_blocks; fputc('\n', stdout); group_blk = fs->super->s_first_data_block; if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) @@ -130,6 +131,13 @@ static void list_desc (ext2_filsys fs) printf(_(", Group descriptors at ")); printf(range_format, old_desc_blk, old_desc_blk + old_desc_blocks - 1); + if (reserved_gdt) { + printf(_("\n Reserved GDT blocks at ")); + printf(range_format, + old_desc_blk + old_desc_blocks, + old_desc_blk + old_desc_blocks + + reserved_gdt - 1); + } } else if (new_desc_blk) { fputc(has_super ? ',' : ' ', stdout); printf(_(" Group descriptor at "));