summaryrefslogtreecommitdiff
path: root/lib/ext2fs/alloc.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2009-10-25 21:41:32 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-10-25 21:41:32 -0400
commite633b58ac75f2f544b7d6572e37d4b63da31e59c (patch)
treeb9dc7c7905f1134bac197d86aadb934a9bf17eec /lib/ext2fs/alloc.c
parent03b9dca63a75731711071e0a7ddef0475d6daf3a (diff)
downloade2fsprogs-e633b58ac75f2f544b7d6572e37d4b63da31e59c.tar.gz
libext2fs: clean up ext2fs_bg_flags_ interfaces
The ext2fs_bg_flag* functions were confusing. Currently we have this: void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags); void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group,__u16 bg_flags); (_set (unused) sets exactly bg_flags; _clear clears all and ignores bg_flags) and these, which can twiddle individual bits in bg_flags: void ext2fs_bg_flag_set(ext2_filsys fs, dgrp_t group, __u16 bg_flag); void ext2fs_bg_flag_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flag); A better interface, after the patch below, is just: ext2fs_bg_flags_zap(fs, group) /* zeros bg_flags */ ext2fs_bg_flags_set(fs, group, flags) /* adds flags to bg_flags */ ext2fs_bg_flags_clear(fs, group, flags) /* clears flags in bg_flags */ and remove the original ext2fs_bg_flags_set / ext2fs_bg_flags_clear. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/alloc.c')
-rw-r--r--lib/ext2fs/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c
index 24ab05bb..a711d456 100644
--- a/lib/ext2fs/alloc.c
+++ b/lib/ext2fs/alloc.c
@@ -68,7 +68,7 @@ static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map,
else
ext2fs_fast_unmark_block_bitmap2(map, blk);
}
- ext2fs_bg_flag_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT);
ext2fs_group_desc_csum_set(fs, group);
}
@@ -89,7 +89,7 @@ static void check_inode_uninit(ext2_filsys fs, ext2fs_inode_bitmap map,
for (i=0; i < fs->super->s_inodes_per_group; i++, ino++)
ext2fs_fast_unmark_inode_bitmap2(map, ino);
- ext2fs_bg_flag_clear(fs, group, EXT2_BG_INODE_UNINIT);
+ ext2fs_bg_flags_clear(fs, group, EXT2_BG_INODE_UNINIT);
check_block_uninit(fs, fs->block_map, group);
}