summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-09-16 10:13:41 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-09-16 10:13:41 -0400
commit2418dfd7b934ee6bf3dc9a0aa4ffee8b37f4384f (patch)
treecd77850db69c667fe4aeda02ead5dcb37e47b327 /misc
parentf314bb0821473efcecedc450c18211e781d30a72 (diff)
downloade2fsprogs-2418dfd7b934ee6bf3dc9a0aa4ffee8b37f4384f.tar.gz
dumpe2fs: display "free blocks" as "free clusters" for bigalloc file systems
Change this for the equivalent function in debugfs as well. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r--misc/dumpe2fs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 9a0dd46b..4d2d5c7d 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -148,12 +148,17 @@ static void list_desc (ext2_filsys fs)
blk64_t first_block, last_block;
blk64_t super_blk, old_desc_blk, new_desc_blk;
char *block_bitmap=NULL, *inode_bitmap=NULL;
+ const char *units = _("blocks");
int inode_blocks_per_group, old_desc_blocks, reserved_gdt;
int block_nbytes, inode_nbytes;
int has_super;
blk64_t blk_itr = EXT2FS_B2C(fs, fs->super->s_first_data_block);
ext2_ino_t ino_itr = 1;
+ if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
+ EXT4_FEATURE_RO_COMPAT_BIGALLOC))
+ units = _("clusters");
+
block_nbytes = EXT2_CLUSTERS_PER_GROUP(fs->super) / 8;
inode_nbytes = EXT2_INODES_PER_GROUP(fs->super) / 8;
@@ -226,9 +231,9 @@ static void list_desc (ext2_filsys fs)
inode_blocks_per_group - 1);
print_bg_rel_offset(fs, ext2fs_inode_table_loc(fs, i), 1,
first_block, last_block);
- printf (_("\n %u free blocks, %u free inodes, "
+ printf (_("\n %u free %s, %u free inodes, "
"%u directories%s"),
- ext2fs_bg_free_blocks_count(fs, i),
+ ext2fs_bg_free_blocks_count(fs, i), units,
ext2fs_bg_free_inodes_count(fs, i),
ext2fs_bg_used_dirs_count(fs, i),
ext2fs_bg_itable_unused(fs, i) ? "" : "\n");