#include "ext2_fs.h"
-
#include "ext2fs.h"
#include "e2image.h"
-#include "nls.h"
blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs, blk64_t group_block,
dgrp_t i)
}
fs->desc_blocks = ext2fs_div_ceil(fs->group_desc_count,
EXT2_DESC_PER_BLOCK(fs->super));
+ if (flags & EXT2_FLAG_SUPER_ONLY)
+ goto skip_read_bg;
retval = ext2fs_get_array(fs->desc_blocks, fs->blocksize,
&fs->group_desc);
if (retval)
if (fs->flags & EXT2_FLAG_RW)
ext2fs_mark_super_dirty(fs);
}
-
+skip_read_bg:
if (ext2fs_has_feature_mmp(fs->super) &&
!(flags & EXT2_FLAG_SKIP_MMP) &&
(flags & (EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE))) {
ext2fs_set_feature_shared_blocks(fs->super);
}
- if (ext2fs_has_feature_fname_encoding(fs->super))
- fs->encoding = nls_load_table(fs->super->s_encoding);
+ if (ext2fs_has_feature_casefold(fs->super))
+ fs->encoding = ext2fs_load_nls_table(fs->super->s_encoding);
fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
*ret_fs = fs;