From cd65a24e756b8f6770a5961fd94c67eb00dd7baa Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 25 Oct 2009 21:42:12 -0400 Subject: libext2fs: Convert ext2fs_bg_flag_test() to ext2fs_bg_flags_test() After cleaning up ext2fs_bg_flag_set() and ext2fs_bg_flag_clear(), we're left with ext2fs_bg_flag_test(). Convert it to ext2fs_bg_flags_test(). Signed-off-by: "Theodore Ts'o" --- resize/resize2fs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'resize') diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 869ae626..538c7b77 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -199,7 +199,7 @@ static void fix_uninit_block_bitmaps(ext2_filsys fs) return; for (g=0; g < fs->group_desc_count; g++) { - if (!(ext2fs_bg_flag_test(fs, g, EXT2_BG_BLOCK_UNINIT))) + if (!(ext2fs_bg_flags_test(fs, g, EXT2_BG_BLOCK_UNINIT))) continue; blk = (g * fs->super->s_blocks_per_group) + @@ -755,7 +755,7 @@ static void mark_fs_metablock(ext2_resize_t rfs, rfs->needed_blocks++; } else if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) && - (ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT))) { + (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) { /* * If the block bitmap is uninitialized, which means * nothing other than standard metadata in use. @@ -816,7 +816,7 @@ static errcode_t blocks_to_move(ext2_resize_t rfs) g = ext2fs_group_of_blk(fs, blk); if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, EXT4_FEATURE_RO_COMPAT_GDT_CSUM) && - ext2fs_bg_flag_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) { + ext2fs_bg_flags_test(old_fs, g, EXT2_BG_BLOCK_UNINIT)) { /* * The block bitmap is uninitialized, so skip * to the next block group. @@ -1791,7 +1791,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs) /* * First calculate the block statistics */ - uninit = ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT); + uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT); ext2fs_super_and_bgd_loc(fs, group, &super_blk, &old_desc_blk, &new_desc_blk, 0); if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) @@ -1825,7 +1825,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs) group++; count = 0; group_free = 0; - uninit = (ext2fs_bg_flag_test(fs, group, EXT2_BG_BLOCK_UNINIT) + uninit = (ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT) ); ext2fs_super_and_bgd_loc(fs, group, &super_blk, &old_desc_blk, @@ -1849,7 +1849,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs) group = 0; /* Protect loop from wrap-around if s_inodes_count maxed */ - uninit = ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT); + uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT); for (ino = 1; ino <= fs->super->s_inodes_count && ino > 0; ino++) { if (uninit || !ext2fs_fast_test_inode_bitmap2(fs->inode_map, ino)) { @@ -1865,8 +1865,7 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs) group++; count = 0; group_free = 0; - uninit = (ext2fs_bg_flag_test(fs, group, EXT2_BG_INODE_UNINIT) - ); + uninit = ext2fs_bg_flags_test(fs, group, EXT2_BG_INODE_UNINIT); } } fs->super->s_free_inodes_count = total_free; -- cgit v1.2.3