retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
flags, 0, 0, io_ptr, ret_fs);
- if (retval == 0)
+ if (retval == 0) {
+ (*ret_fs)->priv_data = ctx;
e2fsck_set_bitmap_type(*ret_fs, EXT2FS_BMAP64_RBTREE,
"default", NULL);
+ }
return retval;
}
}
ctx->fs = fs;
- fs->priv_data = ctx;
fs->now = ctx->now;
sb = fs->super;
const char *profile_name, unsigned int *old_type)
{
unsigned type;
+ e2fsck_t ctx = (e2fsck_t) fs->priv_data;
if (old_type)
*old_type = fs->default_bitmap_type;
- profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
- profile_name, 0, default_type, &type);
- profile_get_uint(e2fsck_global_ctx->profile, "bitmaps",
- "all", 0, type, &type);
+ profile_get_uint(ctx->profile, "bitmaps", profile_name, 0,
+ default_type, &type);
+ profile_get_uint(ctx->profile, "bitmaps", "all", 0, type, &type);
fs->default_bitmap_type = type ? type : default_type;
}