diff options
author | David Sterba <dsterba@suse.cz> | 2015-06-10 02:21:42 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-06-10 02:52:21 +0200 |
commit | 250a58f34d57588de8f0b2f118cb5cd152744158 (patch) | |
tree | d5d1a7c094dd6a431bb9c389eac98993e89cf936 | |
parent | 76a9be2e72e6634f4ca4b68dd2a9e00e6f48f26a (diff) |
btrfs-progs: add missing includes to header files
Add includes that let the header files compile or add explicit include
of kerncompat if the uXX types are used.
Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r-- | btrfs-list.c | 2 | ||||
-rw-r--r-- | btrfs-list.h | 6 | ||||
-rw-r--r-- | btrfsck.h | 2 | ||||
-rw-r--r-- | cmds-fi-usage.h | 3 | ||||
-rw-r--r-- | disk-io.h | 3 | ||||
-rw-r--r-- | free-space-cache.h | 4 | ||||
-rw-r--r-- | ioctl.h | 7 | ||||
-rw-r--r-- | qgroup-verify.h | 3 | ||||
-rw-r--r-- | qgroup.h | 2 | ||||
-rw-r--r-- | repair.h | 2 | ||||
-rw-r--r-- | send-stream.h | 6 | ||||
-rw-r--r-- | send-utils.h | 2 | ||||
-rw-r--r-- | transaction.h | 3 | ||||
-rw-r--r-- | volumes.h | 3 |
14 files changed, 42 insertions, 6 deletions
diff --git a/btrfs-list.c b/btrfs-list.c index 3e29cf80..875a89dc 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -18,7 +18,6 @@ #include <sys/ioctl.h> #include <sys/mount.h> -#include "ioctl.h" #include <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -30,6 +29,7 @@ #include "ctree.h" #include "transaction.h" #include "utils.h" +#include "ioctl.h" #include <uuid/uuid.h> #include "btrfs-list.h" #include "rbtree-utils.h" diff --git a/btrfs-list.h b/btrfs-list.h index 4b213008..13f44c3a 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -21,10 +21,16 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" +#include "rbtree.h" +#include "ioctl.h" #else #include <btrfs/kerncompat.h> +#include <btrfs/rbtree.h> +#include <btrfs/ioctl.h> #endif /* BTRFS_FLAT_INCLUDES */ +#include <time.h> + #define BTRFS_LIST_LAYOUT_DEFAULT 0 #define BTRFS_LIST_LAYOUT_TABLE 1 #define BTRFS_LIST_LAYOUT_RAW 2 @@ -22,10 +22,12 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" +#include "ctree.h" #include "extent-cache.h" #include "list.h" #else #include <btrfs/kerncompat.h> +#include <btrfs/ctree.h> #include <btrfs/extent-cache.h> #include <btrfs/list.h> #endif /* BTRFS_FLAT_INCLUDES */ diff --git a/cmds-fi-usage.h b/cmds-fi-usage.h index c8061d15..adb8ad30 100644 --- a/cmds-fi-usage.h +++ b/cmds-fi-usage.h @@ -19,6 +19,9 @@ #ifndef __CMDS_FI_USAGE_H__ #define __CMDS_FI_USAGE_H__ +#include "kerncompat.h" +#include "ioctl.h" + extern const char * const cmd_filesystem_usage_usage[]; int cmd_filesystem_usage(int argc, char **argv); @@ -19,6 +19,9 @@ #ifndef __BTRFS_DISK_IO_H__ #define __BTRFS_DISK_IO_H__ +#include "kerncompat.h" +#include "ctree.h" + #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 diff --git a/free-space-cache.h b/free-space-cache.h index f2e71a58..85411a10 100644 --- a/free-space-cache.h +++ b/free-space-cache.h @@ -19,6 +19,10 @@ #ifndef __BTRFS_FREE_SPACE_CACHE_H__ #define __BTRFS_FREE_SPACE_CACHE_H__ +#include "kerncompat.h" +#include "ctree.h" +#include "rbtree.h" + struct btrfs_free_space { struct rb_node offset_index; u64 offset; @@ -19,14 +19,13 @@ #ifndef __BTRFS_IOCTL_H__ #define __BTRFS_IOCTL_H__ -#include <asm/types.h> -#include <linux/ioctl.h> -#include <time.h> - #ifdef __cplusplus extern "C" { #endif +#include <asm/types.h> +#include <linux/ioctl.h> + #ifndef __user #define __user #endif diff --git a/qgroup-verify.h b/qgroup-verify.h index 174ed455..7d91c197 100644 --- a/qgroup-verify.h +++ b/qgroup-verify.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_QGROUP_VERIFY_H__ #define __BTRFS_QGROUP_VERIFY_H__ +#include "kerncompat.h" +#include "ctree.h" + int qgroup_verify_all(struct btrfs_fs_info *info); void print_qgroup_report(int all); @@ -19,8 +19,8 @@ #ifndef __BTRFS_QGROUP_H__ #define __BTRFS_QGROUP_H__ -#include "ioctl.h" #include "kerncompat.h" +#include "ioctl.h" struct btrfs_qgroup; @@ -19,6 +19,8 @@ #ifndef __BTRFS_REPAIR_H__ #define __BTRFS_REPAIR_H__ +#include "ctree.h" + struct btrfs_corrupt_block { struct cache_extent cache; struct btrfs_key key; diff --git a/send-stream.h b/send-stream.h index 133a3105..39901f86 100644 --- a/send-stream.h +++ b/send-stream.h @@ -28,6 +28,12 @@ extern "C" { #endif +#if BTRFS_FLAT_INCLUDES +#include "kerncompat.h" +#else +#include <btrfs/kerncompat.h> +#endif /* BTRFS_FLAT_INCLUDES */ + struct btrfs_send_ops { int (*subvol)(const char *path, const u8 *uuid, u64 ctransid, void *user); diff --git a/send-utils.h b/send-utils.h index 0f38b5ad..d28c8d51 100644 --- a/send-utils.h +++ b/send-utils.h @@ -20,9 +20,11 @@ #define __BTRFS_SEND_UTILS_H__ #if BTRFS_FLAT_INCLUDES +#include "kerncompat.h" #include "ctree.h" #include "rbtree.h" #else +#include <btrfs/kerncompat.h> #include <btrfs/ctree.h> #include <btrfs/rbtree.h> #endif /* BTRFS_FLAT_INCLUDES */ diff --git a/transaction.h b/transaction.h index c5780bc6..13e09a64 100644 --- a/transaction.h +++ b/transaction.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_TRANSACTION_H__ #define __BTRFS_TRANSACTION_H__ +#include "kerncompat.h" +#include "ctree.h" + struct btrfs_trans_handle { u64 transid; u64 alloc_exclude_start; @@ -19,6 +19,9 @@ #ifndef __BTRFS_VOLUMES_H__ #define __BTRFS_VOLUMES_H__ +#include "kerncompat.h" +#include "ctree.h" + #define BTRFS_STRIPE_LEN (64 * 1024) struct btrfs_device { |