Whamcloud - gitweb
ext2fs.h: Change how we deal with optional incompat features.
authorTony Breeds <tony@bakeyournoodle.com>
Tue, 26 Jun 2012 01:42:14 +0000 (11:42 +1000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 Jul 2012 00:52:00 +0000 (20:52 -0400)
Currently EXT2_LIB_FEATURE_INCOMPAT_SUPP is #defined twice once with
EXT2_FEATURE_INCOMPAT_COMPRESSION and once without depending on the
state of ENABLE_COMPRESSION

Change this to use an intermediate symbol so that the definition of
EXT2_LIB_FEATURE_INCOMPAT_SUPP doesn't change as other optional fetures
are added.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h

index ff088bb..7be148e 100644 (file)
@@ -554,17 +554,13 @@ typedef struct ext2_icount *ext2_icount_t;
    environment at configure time. */
  #warning "Compression support is experimental"
 #endif
-#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
-                                        EXT2_FEATURE_INCOMPAT_COMPRESSION|\
-                                        EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
-                                        EXT2_FEATURE_INCOMPAT_META_BG|\
-                                        EXT3_FEATURE_INCOMPAT_RECOVER|\
-                                        EXT3_FEATURE_INCOMPAT_EXTENTS|\
-                                        EXT4_FEATURE_INCOMPAT_FLEX_BG|\
-                                        EXT4_FEATURE_INCOMPAT_MMP|\
-                                        EXT4_FEATURE_INCOMPAT_64BIT)
+#define EXT2_LIB_INCOMPAT_COMPRESSION  EXT2_FEATURE_INCOMPAT_COMPRESSION
 #else
+#define EXT2_LIB_INCOMPAT_COMPRESSION  (0)
+#endif
+
 #define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\
+                                        EXT2_LIB_INCOMPAT_COMPRESSION|\
                                         EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
                                         EXT2_FEATURE_INCOMPAT_META_BG|\
                                         EXT3_FEATURE_INCOMPAT_RECOVER|\
@@ -572,7 +568,6 @@ typedef struct ext2_icount *ext2_icount_t;
                                         EXT4_FEATURE_INCOMPAT_FLEX_BG|\
                                         EXT4_FEATURE_INCOMPAT_MMP|\
                                         EXT4_FEATURE_INCOMPAT_64BIT)
-#endif
 #ifdef CONFIG_QUOTA
 #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP        (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
                                         EXT4_FEATURE_RO_COMPAT_HUGE_FILE|\