]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Enhance dumpe2fs so that it will print the location of the reserved
authorTheodore Ts'o <tytso@mit.edu>
Thu, 23 Dec 2004 18:54:28 +0000 (13:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 23 Dec 2004 18:54:28 +0000 (13:54 -0500)
GDT blocks if they are present.

misc/ChangeLog
misc/dumpe2fs.c

index 9c9d83dcacebe922847513e9d89e8742e5c17271..e040632c26a9c3370d9b7c8311a1d7dce128bc77 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-23  Theodore Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * fsck.c (main): Check return from malloc of fsck_path string.
index da8fdfab84139bfbf1044b7bccae51c34883b9c7..73042fafe06cedd46b858ec76afb86b65fa5902f 100644 (file)
@@ -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 "));