summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2015-10-24 01:26:35 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-10-24 01:26:35 -0400
commit4ee26699823c945b1894880f53cea3b45b5e3a20 (patch)
treeefad6ebb99252ca3462c44bcfb6062772f9b3b97 /contrib
parent21e37be65ba886a2b743ab435400ec9e63548e36 (diff)
debugfs: clean up feature test macros with predicate functions
Create separate predicate functions to test/set/clear feature flags, thereby replacing the wordy old macros. Furthermore, clean out the places where we open-coded feature tests. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/add_ext4_encrypt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/add_ext4_encrypt.c b/contrib/add_ext4_encrypt.c
index 73008dc1..d4e7c8c5 100644
--- a/contrib/add_ext4_encrypt.c
+++ b/contrib/add_ext4_encrypt.c
@@ -42,9 +42,8 @@ int main (int argc, char *argv[])
argv[1]);
exit(1);
}
- if (!EXT2_HAS_INCOMPAT_FEATURE(fs->super,
- EXT4_FEATURE_INCOMPAT_ENCRYPT)) {
- fs->super->s_feature_incompat |= EXT4_FEATURE_INCOMPAT_ENCRYPT;
+ if (!ext2fs_has_feature_encrypt(fs->super)) {
+ ext2fs_set_feature_encrypt(fs->super);
fs->super->s_encrypt_algos[0] =
EXT4_ENCRYPTION_MODE_AES_256_XTS;
fs->super->s_encrypt_algos[1] =