summaryrefslogtreecommitdiff
path: root/lib/ext2fs/gen_bitmap64.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-12-16 11:24:23 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-12-18 00:28:43 -0500
commit67861e5bf3ae177b14d34846218fcdfdeee805a6 (patch)
tree6906033e1426a0d7e3f77e911c72d1118e94b099 /lib/ext2fs/gen_bitmap64.c
parent24c91184d6577271f7387962c90626c973389f00 (diff)
downloade2fsprogs-67861e5bf3ae177b14d34846218fcdfdeee805a6.tar.gz
libext2fs: add default_bitmap_type to the ext2_filsys structure
This allows a program to control the bitmap backend implementation that will get used without needing to change the current library API. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/gen_bitmap64.c')
-rw-r--r--lib/ext2fs/gen_bitmap64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 4dc4e082..e1b4f420 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -88,6 +88,9 @@ errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
struct ext2_bitmap_ops *ops;
errcode_t retval;
+ if (!type)
+ type = EXT2FS_BMAP64_BITARRAY;
+
switch (type) {
case EXT2FS_BMAP64_BITARRAY:
ops = &ext2fs_blkmap64_bitarray;