useful-e2fsck-files/first-look-here/super.c
static void e2fsck_fix_dirhash_hint(e2fsck_t ctx)
{
	struct ext2_super_block *sb = ctx->fs->super;
	struct problem_context pctx;
	char	c;

	if ((ctx->options & E2F_OPT_READONLY) ||
	    !(sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) ||
	    (sb->s_flags & (EXT2_FLAGS_SIGNED_HASH|EXT2_FLAGS_UNSIGNED_HASH)))
		return;

	c = (char) 255;

	clear_problem_context(&pctx);
	if (fix_problem(ctx, PR_0_DIRHASH_HINT, &pctx)) {
		if (((int) c) == -1) {
			sb->s_flags |= EXT2_FLAGS_SIGNED_HASH;
		} else {
			sb->s_flags |= EXT2_FLAGS_UNSIGNED_HASH;
		}
		ext2fs_mark_super_dirty(ctx->fs);
	}
}
/*
 * This function checks the dirhash signed/unsigned hint if necessary.
 */
This function checks the dirhash signed/unsigned hint if necessary.
This function checks the dirhash signed / unsigned hint if necessary .
static void e2fsck_fix_dirhash_hint(e2fsck_t ctx)
{
	struct ext2_super_block *sb = ctx->fs->super;
	struct problem_context pctx;
	char	c;
	if ((ctx->options & E2F_OPT_READONLY) ||
	    !(sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) ||
	    (sb->s_flags & (EXT2_FLAGS_SIGNED_HASH|EXT2_FLAGS_UNSIGNED_HASH)))
		return;
	c = (char) 255;
	clear_problem_context(&pctx);
	if (fix_problem(ctx, PR_0_DIRHASH_HINT, &pctx)) {
		if (((int) c) == -1) {
			sb->s_flags |= EXT2_FLAGS_SIGNED_HASH;
		} else {
			sb->s_flags |= EXT2_FLAGS_UNSIGNED_HASH;
		}
		ext2fs_mark_super_dirty(ctx->fs);
	}
}
static void e2fsck_fix_dirhash_hint ( e2fsck_t ctx ) { struct ext2_super_block * sb = ctx -> fs -> super ; struct problem_context pctx ; char c ; if ( ( ctx -> options & E2F_OPT_READONLY ) || ! ( sb -> s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX ) || ( sb -> s_flags & ( EXT2_FLAGS_SIGNED_HASH | EXT2_FLAGS_UNSIGNED_HASH ) ) ) return ; c = ( char ) 255 ; clear_problem_context ( & pctx ) ; if ( fix_problem ( ctx , PR_0_DIRHASH_HINT , & pctx ) ) { if ( ( ( int ) c ) == -1 ) { sb -> s_flags |= EXT2_FLAGS_SIGNED_HASH ; } else { sb -> s_flags |= EXT2_FLAGS_UNSIGNED_HASH ; } ext2fs_mark_super_dirty ( ctx -> fs ) ; } }
This function checks the dirhash signed/unsigned hint if necessary.
This function checks the dirhash signed / unsigned hint if necessary .