summaryrefslogtreecommitdiff
path: root/lib/ext2fs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2011-09-16 15:49:16 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-09-16 18:43:04 -0400
commitbc28abc537ff49d708abd66cc70ee451fdd010fd (patch)
treec0766c776f8b071d9dd067dd2c043413a958b284 /lib/ext2fs
parentae96c678e15eda2a5d0eea7e1067b449f6604aff (diff)
downloade2fsprogs-bc28abc537ff49d708abd66cc70ee451fdd010fd.tar.gz
libext2: Fix EXT2_LIB_SOFTSUPP masking
EXT2_LIB_SOFTSUPP_INCOMPAT_* are supposed to be bitmasks of features which can be opened even though they are under development. The intent is that these are masked out of the features list, so that they will be ignored on open. However, the code does a logical not vs. a bitwise not: features &= !EXT2_LIB_SOFTSUPP_INCOMPAT; which will not have the desired effect... Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs')
-rw-r--r--lib/ext2fs/openfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index b13db777..0b4df38a 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -214,7 +214,7 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
features = fs->super->s_feature_incompat;
#ifdef EXT2_LIB_SOFTSUPP_INCOMPAT
if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
- features &= !EXT2_LIB_SOFTSUPP_INCOMPAT;
+ features &= ~EXT2_LIB_SOFTSUPP_INCOMPAT;
#endif
if (features & ~EXT2_LIB_FEATURE_INCOMPAT_SUPP) {
retval = EXT2_ET_UNSUPP_FEATURE;
@@ -224,7 +224,7 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
features = fs->super->s_feature_ro_compat;
#ifdef EXT2_LIB_SOFTSUPP_RO_COMPAT
if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
- features &= !EXT2_LIB_SOFTSUPP_RO_COMPAT;
+ features &= ~EXT2_LIB_SOFTSUPP_RO_COMPAT;
#endif
if ((flags & EXT2_FLAG_RW) &&
(features & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP)) {