diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 3ad81ce73..dcc743deb 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -16,6 +16,7 @@ * dmeventd - dm event daemon to monitor active mapped devices */ +#include "device_mapper/misc/dmlib.h" #include "base/memory/zalloc.h" #include "device_mapper/misc/dm-logging.h" diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c index 157b5f152..e58a0ce8c 100644 --- a/daemons/dmeventd/libdevmapper-event.c +++ b/daemons/dmeventd/libdevmapper-event.c @@ -12,9 +12,9 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "device_mapper/misc/dmlib.h" #include "base/memory/zalloc.h" #include "device_mapper/misc/dm-logging.h" -#include "device_mapper/misc/dmlib.h" #include "daemons/dmeventd/libdevmapper-event.h" #include "dmeventd.h" #include "lib/misc/intl.h" diff --git a/device_mapper/all.h b/device_mapper/all.h index 8dcb38ca6..602b7ba10 100644 --- a/device_mapper/all.h +++ b/device_mapper/all.h @@ -17,6 +17,9 @@ #ifndef LIB_DEVICE_MAPPER_H #define LIB_DEVICE_MAPPER_H +#include "base/data-struct/list.h" +#include "base/data-struct/hash.h" + #include #include #include @@ -31,9 +34,6 @@ #include #include -#include "base/data-struct/list.h" -#include "base/data-struct/hash.h" - #ifndef __GNUC__ # define __typeof__ typeof #endif diff --git a/device_mapper/libdm-common.c b/device_mapper/libdm-common.c index d46d4b05c..111fff680 100644 --- a/device_mapper/libdm-common.c +++ b/device_mapper/libdm-common.c @@ -13,12 +13,12 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "base/memory/zalloc.h" -#include "device_mapper/misc/dmlib.h" -#include "ioctl/libdm-targets.h" +#include "misc/dmlib.h" #include "libdm-common.h" +#include "ioctl/libdm-targets.h" #include "misc/kdev_t.h" #include "misc/dm-ioctl.h" +#include "base/memory/zalloc.h" #include #include diff --git a/device_mapper/vdo/status.c b/device_mapper/vdo/status.c index 7a26e1a89..f423ca15e 100644 --- a/device_mapper/vdo/status.c +++ b/device_mapper/vdo/status.c @@ -1,3 +1,4 @@ +#include "configure.h" #include "target.h" // For DM_ARRAY_SIZE! diff --git a/lib/device/bcache.h b/lib/device/bcache.h index cb36c3088..ae5e69c8b 100644 --- a/lib/device/bcache.h +++ b/lib/device/bcache.h @@ -15,6 +15,7 @@ #ifndef BCACHE_H #define BCACHE_H +#include "configure.h" #include "device_mapper/all.h" #include diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c index 83786f44d..44386a6dd 100644 --- a/libdm/dm-tools/dmsetup.c +++ b/libdm/dm-tools/dmsetup.c @@ -18,11 +18,10 @@ // For canonicalize_file_name() #define _GNU_SOURCE -#include +#include "configure.h" #include "libdm/misc/dm-logging.h" #include "libdm/dm-tools/util.h" -#include "configure.h" #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #ifdef UDEV_SYNC_SUPPORT # include diff --git a/test/unit/activation-generator_t.c b/test/unit/activation-generator_t.c index 9f6b661ca..cff096888 100644 --- a/test/unit/activation-generator_t.c +++ b/test/unit/activation-generator_t.c @@ -12,9 +12,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "scripts/generator-internals.c" -#include "framework.h" #include "units.h" +#include "scripts/generator-internals.c" #include "device_mapper/all.h" diff --git a/test/unit/bcache_t.c b/test/unit/bcache_t.c index 5e0700572..92c2d57d4 100644 --- a/test/unit/bcache_t.c +++ b/test/unit/bcache_t.c @@ -12,15 +12,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "units.h" +#include "lib/device/bcache.h" + #include #include #include #include -#include "lib/device/bcache.h" -#include "framework.h" -#include "units.h" - #define SHOW_MOCK_CALLS 0 /*---------------------------------------------------------------- diff --git a/test/unit/bcache_utils_t.c b/test/unit/bcache_utils_t.c index 66780ea21..2e0832096 100644 --- a/test/unit/bcache_utils_t.c +++ b/test/unit/bcache_utils_t.c @@ -14,9 +14,8 @@ #define _GNU_SOURCE -#include "lib/device/bcache.h" -#include "framework.h" #include "units.h" +#include "lib/device/bcache.h" #include #include diff --git a/test/unit/framework.h b/test/unit/framework.h index 0c455969c..d5a2cddda 100644 --- a/test/unit/framework.h +++ b/test/unit/framework.h @@ -1,6 +1,7 @@ #ifndef TEST_UNIT_FRAMEWORK_H #define TEST_UNIT_FRAMEWORK_H +#include "configure.h" #include "device_mapper/all.h" #include diff --git a/test/unit/io_engine_t.c b/test/unit/io_engine_t.c index 1a4f638e5..bac9c3862 100644 --- a/test/unit/io_engine_t.c +++ b/test/unit/io_engine_t.c @@ -14,6 +14,9 @@ #define _GNU_SOURCE +#include "units.h" +#include "lib/device/bcache.h" + #include #include #include @@ -22,10 +25,6 @@ #include #include -#include "lib/device/bcache.h" -#include "framework.h" -#include "units.h" - //---------------------------------------------------------------- #define SECTOR_SIZE 512 diff --git a/test/unit/radix_tree_t.c b/test/unit/radix_tree_t.c index 2fba15f05..e5d3e982a 100644 --- a/test/unit/radix_tree_t.c +++ b/test/unit/radix_tree_t.c @@ -10,11 +10,10 @@ // along with this program; if not, write to the Free Software Foundation, // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +#include "units.h" #include "base/data-struct/radix-tree.h" #include "base/memory/container_of.h" -#include "units.h" - #include #include diff --git a/test/unit/vdo_t.c b/test/unit/vdo_t.c index 9c41887ee..a26c0b90e 100644 --- a/test/unit/vdo_t.c +++ b/test/unit/vdo_t.c @@ -12,9 +12,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "device_mapper/vdo/target.h" -#include "framework.h" #include "units.h" +#include "device_mapper/vdo/target.h" //----------------------------------------------------------------