ext4_config: add defines allowing disabling xattr and extent modules
authorgkostka <kostka.grzegorz@gmail.com>
Sat, 20 May 2017 07:35:40 +0000 (09:35 +0200)
committergkostka <kostka.grzegorz@gmail.com>
Sat, 20 May 2017 08:13:09 +0000 (10:13 +0200)
include/ext4_config.h
include/ext4_extent.h
src/ext4_extent.c
src/ext4_xattr.c

index 56cabf2fb6609f1753eb10818e246e076ad24c30..72dcdc3e2da3e9574deae81c96337de13035616f 100644 (file)
@@ -88,6 +88,16 @@ extern "C" {
 #define CONFIG_JOURNALING_ENABLE 1
 #endif
 
+/**@brief  Enable/disable xattr*/
+#ifndef CONFIG_XATTR_ENABLE
+#define CONFIG_XATTR_ENABLE 1
+#endif
+
+/**@brief  Enable/disable extents*/
+#ifndef CONFIG_EXTENTS_ENABLE
+#define CONFIG_EXTENTS_ENABLE 1
+#endif
+
 /**@brief   Include error codes from ext4_errno or standard library.*/
 #ifndef CONFIG_HAVE_OWN_ERRNO
 #define CONFIG_HAVE_OWN_ERRNO 0
index c12a1b815edb8a1862efa3fbd5ebf6459f201cbf..fee09269eb2bc1a3d0e400a1766809a5a944b088 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * Copyright (c) 2013 Grzegorz Kostka (kostka.grzegorz@gmail.com)
  *
- *
  * HelenOS:
  * Copyright (c) 2012 Martin Sucha
  * Copyright (c) 2012 Frantisek Princ
index 7eb4242f0a1a434d1e6e8994080fa865e22d4de5..dc56ba734bfa9f64d722a9811e4011515379a158 100644 (file)
@@ -27,6 +27,7 @@
 #include <inttypes.h>
 #include <stddef.h>
 
+#if CONFIG_EXTENTS_ENABLE
 /*
  * used by extent splitting.
  */
@@ -2136,3 +2137,4 @@ out2:
 
        return err;
 }
+#endif
index e434f3ef5e9dadff7a2127de99969b3932aaf765..f8a577891c061e673746b2ffc0dec587c5d00e47 100644 (file)
@@ -35,6 +35,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if CONFIG_XATTR_ENABLE
+
 /**
  * @file  ext4_xattr.c
  * @brief Extended Attribute Manipulation
@@ -1555,6 +1557,8 @@ out:
        return ret;
 }
 
+#endif
+
 /**
  * @}
  */