From 47d9119ca9b8f55408b4514b90f340115315985a Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sun, 19 Jun 2022 20:23:45 +0200 Subject: [PATCH] ext: Turn presence of encryption feature to a warning. Closes #179 --- common/fs/ext2.s2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/fs/ext2.s2.c b/common/fs/ext2.s2.c index 82c8a6c4..9e6ddb6a 100644 --- a/common/fs/ext2.s2.c +++ b/common/fs/ext2.s2.c @@ -324,12 +324,15 @@ bool ext2_open(struct ext2_file_handle *ret, struct volume *part, const char *pa if (sb->s_rev_level != 0 && (sb->s_feature_incompat & EXT2_IF_COMPRESSION || sb->s_feature_incompat & EXT2_IF_INLINE_DATA || - sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG || - sb->s_feature_incompat & EXT2_IF_ENCRYPT)) { + sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)) { print("ext2: filesystem has unsupported features %x\n", sb->s_feature_incompat); return false; } + if (sb->s_rev_level != 0 && sb->s_feature_incompat & EXT2_IF_ENCRYPT) { + print("ext2: WARNING: File system has encryption feature on, stuff may misbehave\n"); + } + if (sb->s_state == EXT2_FS_UNRECOVERABLE_ERRORS) { print("ext2: unrecoverable errors found\n"); return false;