From 384bc17f63cbc2d11fd2d6f82d8446790a703b8a Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 14 Sep 2022 17:06:52 +0200 Subject: [PATCH] btrfs-progs: reorder includes in standalone tools The preferred order: - system headers - standard headers - libraries - kernel library - kernel shared - common headers - other tools - own headers Signed-off-by: David Sterba --- btrfs-corrupt-block.c | 3 +-- btrfs-find-root.c | 11 +++++------ btrfs-fragments.c | 16 ++++++---------- btrfs-map-logical.c | 6 +++--- btrfs-sb-mod.c | 4 ++-- btrfs-select-super.c | 8 ++++---- btrfs.c | 3 +-- btrfstune.c | 11 +++++------ quick-test.c | 2 +- random-test.c | 2 +- 10 files changed, 29 insertions(+), 37 deletions(-) diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index b6aefe65..8fb9fb06 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -16,14 +16,13 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" #include #include #include #include #include #include - -#include "kerncompat.h" #include "kernel-shared/ctree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 5ae808cc..c0ad4a40 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -16,23 +16,22 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" +#include #include #include #include #include -#include -#include #include - -#include "kerncompat.h" +#include +#include "kernel-lib/list.h" #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/print-tree.h" #include "kernel-shared/transaction.h" -#include "kernel-lib/list.h" #include "kernel-shared/volumes.h" -#include "common/utils.h" #include "crypto/crc32c.h" +#include "common/utils.h" #include "common/extent-cache.h" #include "common/help.h" #include "cmds/commands.h" diff --git a/btrfs-fragments.c b/btrfs-fragments.c index 21f790c0..df8ad352 100644 --- a/btrfs-fragments.c +++ b/btrfs-fragments.c @@ -14,28 +14,24 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" +#include +#include +#include #include #include #include -#include -#include #include -#include #include #include #include #include -#include #include - +#include #include - -#undef ULONG_MAX - -#include "kerncompat.h" #include "kernel-shared/ctree.h" -#include "ioctl.h" #include "common/utils.h" +#include "ioctl.h" static int use_color; static void diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index 860c196d..8ac7f34d 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -16,19 +16,19 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" #include #include #include #include #include -#include "kerncompat.h" +#include "kernel-lib/list.h" +#include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/print-tree.h" #include "kernel-shared/transaction.h" -#include "kernel-lib/list.h" -#include "kernel-lib/radix-tree.h" #include "common/utils.h" #include "common/help.h" diff --git a/btrfs-sb-mod.c b/btrfs-sb-mod.c index f56388bd..e3ba562a 100644 --- a/btrfs-sb-mod.c +++ b/btrfs-sb-mod.c @@ -15,11 +15,11 @@ */ #include "kerncompat.h" +#include +#include #include #include #include -#include -#include #include #include #include diff --git a/btrfs-select-super.c b/btrfs-select-super.c index d8b54e9b..42e5866b 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -16,19 +16,19 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" +#include #include #include #include #include -#include -#include "kerncompat.h" +#include "kernel-lib/list.h" +#include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/print-tree.h" #include "kernel-shared/transaction.h" -#include "kernel-lib/list.h" -#include "kernel-lib/radix-tree.h" #include "common/utils.h" #include "common/help.h" #include "common/open-utils.h" diff --git a/btrfs.c b/btrfs.c index c40ddfa6..f8fc0cee 100644 --- a/btrfs.c +++ b/btrfs.c @@ -18,13 +18,12 @@ #include #include #include - #include "kernel-shared/volumes.h" #include "crypto/crc32c.h" -#include "cmds/commands.h" #include "common/utils.h" #include "common/help.h" #include "common/box.h" +#include "cmds/commands.h" static const char * const btrfs_cmd_group_usage[] = { "btrfs [--help] [--version] [--format ] [-v|--verbose] [-q|--quiet] [...] []", diff --git a/btrfstune.c b/btrfstune.c index add7b180..89eaa458 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -16,22 +16,21 @@ * Boston, MA 021110-1307, USA. */ -#include -#include +#include "kerncompat.h" #include #include +#include +#include #include #include #include -#include #include - -#include "kerncompat.h" +#include #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/transaction.h" -#include "common/utils.h" #include "kernel-shared/volumes.h" +#include "common/utils.h" #include "common/open-utils.h" #include "common/parse-utils.h" #include "common/device-scan.h" diff --git a/quick-test.c b/quick-test.c index d9b0f11b..dbed1b2d 100644 --- a/quick-test.c +++ b/quick-test.c @@ -16,10 +16,10 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" #include #include #include -#include "kerncompat.h" #include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" diff --git a/random-test.c b/random-test.c index a612bc02..4cfbdaaf 100644 --- a/random-test.c +++ b/random-test.c @@ -16,10 +16,10 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" #include #include #include -#include "kerncompat.h" #include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h"