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 <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-09-14 17:06:52 +02:00
parent b121ac4404
commit 384bc17f63
10 changed files with 29 additions and 37 deletions

View File

@ -16,14 +16,13 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#include <limits.h> #include <limits.h>
#include "kerncompat.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"

View File

@ -16,23 +16,22 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h>
#include <zlib.h>
#include <getopt.h> #include <getopt.h>
#include <zlib.h>
#include "kerncompat.h" #include "kernel-lib/list.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h" #include "kernel-shared/print-tree.h"
#include "kernel-shared/transaction.h" #include "kernel-shared/transaction.h"
#include "kernel-lib/list.h"
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "common/utils.h"
#include "crypto/crc32c.h" #include "crypto/crc32c.h"
#include "common/utils.h"
#include "common/extent-cache.h" #include "common/extent-cache.h"
#include "common/help.h" #include "common/help.h"
#include "cmds/commands.h" #include "cmds/commands.h"

View File

@ -14,28 +14,24 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <libgen.h> #include <libgen.h>
#include <limits.h> #include <limits.h>
#include <uuid/uuid.h>
#include <ctype.h> #include <ctype.h>
#include <uuid/uuid.h>
#include <gd.h> #include <gd.h>
#undef ULONG_MAX
#include "kerncompat.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "ioctl.h"
#include "common/utils.h" #include "common/utils.h"
#include "ioctl.h"
static int use_color; static int use_color;
static void static void

View File

@ -16,19 +16,19 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <getopt.h> #include <getopt.h>
#include "kerncompat.h" #include "kernel-lib/list.h"
#include "kernel-lib/radix-tree.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h" #include "kernel-shared/print-tree.h"
#include "kernel-shared/transaction.h" #include "kernel-shared/transaction.h"
#include "kernel-lib/list.h"
#include "kernel-lib/radix-tree.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"

View File

@ -15,11 +15,11 @@
*/ */
#include "kerncompat.h" #include "kerncompat.h"
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>

View File

@ -16,19 +16,19 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include "kernel-lib/list.h"
#include "kerncompat.h" #include "kernel-lib/radix-tree.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h" #include "kernel-shared/print-tree.h"
#include "kernel-shared/transaction.h" #include "kernel-shared/transaction.h"
#include "kernel-lib/list.h"
#include "kernel-lib/radix-tree.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"
#include "common/open-utils.h" #include "common/open-utils.h"

View File

@ -18,13 +18,12 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <getopt.h> #include <getopt.h>
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "crypto/crc32c.h" #include "crypto/crc32c.h"
#include "cmds/commands.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"
#include "common/box.h" #include "common/box.h"
#include "cmds/commands.h"
static const char * const btrfs_cmd_group_usage[] = { static const char * const btrfs_cmd_group_usage[] = {
"btrfs [--help] [--version] [--format <format>] [-v|--verbose] [-q|--quiet] <group> [<group>...] <command> [<args>]", "btrfs [--help] [--version] [--format <format>] [-v|--verbose] [-q|--quiet] <group> [<group>...] <command> [<args>]",

View File

@ -16,22 +16,21 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include <stdio.h> #include "kerncompat.h"
#include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <dirent.h> #include <dirent.h>
#include <uuid/uuid.h>
#include <getopt.h> #include <getopt.h>
#include <uuid/uuid.h>
#include "kerncompat.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"
#include "kernel-shared/transaction.h" #include "kernel-shared/transaction.h"
#include "common/utils.h"
#include "kernel-shared/volumes.h" #include "kernel-shared/volumes.h"
#include "common/utils.h"
#include "common/open-utils.h" #include "common/open-utils.h"
#include "common/parse-utils.h" #include "common/parse-utils.h"
#include "common/device-scan.h" #include "common/device-scan.h"

View File

@ -16,10 +16,10 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include "kerncompat.h"
#include "kernel-lib/radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"

View File

@ -16,10 +16,10 @@
* Boston, MA 021110-1307, USA. * Boston, MA 021110-1307, USA.
*/ */
#include "kerncompat.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include "kerncompat.h"
#include "kernel-lib/radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "kernel-shared/ctree.h" #include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h" #include "kernel-shared/disk-io.h"