diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2017-05-20 09:35:40 +0200 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2017-05-20 10:13:09 +0200 |
| commit | 6f29a7eab37d41058924c6e60bb91d74bf91018d (patch) | |
| tree | 18cbac3b11ccaea79a8d43943eb2ecff83e96f08 | |
| parent | dee6a10ab37fef64f47ddfadeae02a9449fb9294 (diff) | |
ext4_config: add defines allowing disabling xattr and extent modules
| -rw-r--r-- | include/ext4_config.h | 10 | ||||
| -rw-r--r-- | include/ext4_extent.h | 1 | ||||
| -rw-r--r-- | src/ext4_extent.c | 2 | ||||
| -rw-r--r-- | src/ext4_xattr.c | 4 |
4 files changed, 16 insertions, 1 deletions
diff --git a/include/ext4_config.h b/include/ext4_config.h index 56cabf2..72dcdc3 100644 --- a/include/ext4_config.h +++ b/include/ext4_config.h @@ -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 diff --git a/include/ext4_extent.h b/include/ext4_extent.h index c12a1b8..fee0926 100644 --- a/include/ext4_extent.h +++ b/include/ext4_extent.h @@ -1,7 +1,6 @@ /* * Copyright (c) 2013 Grzegorz Kostka (kostka.grzegorz@gmail.com) * - * * HelenOS: * Copyright (c) 2012 Martin Sucha * Copyright (c) 2012 Frantisek Princ diff --git a/src/ext4_extent.c b/src/ext4_extent.c index 7eb4242..dc56ba7 100644 --- a/src/ext4_extent.c +++ b/src/ext4_extent.c @@ -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 diff --git a/src/ext4_xattr.c b/src/ext4_xattr.c index e434f3e..f8a5778 100644 --- a/src/ext4_xattr.c +++ b/src/ext4_xattr.c @@ -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 + /** * @} */ |
