aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-06-10 02:21:42 +0200
committerDavid Sterba <dsterba@suse.cz>2015-06-10 02:52:21 +0200
commit250a58f34d57588de8f0b2f118cb5cd152744158 (patch)
treed5d1a7c094dd6a431bb9c389eac98993e89cf936
parent76a9be2e72e6634f4ca4b68dd2a9e00e6f48f26a (diff)
downloadbtrfs-progs-250a58f34d57588de8f0b2f118cb5cd152744158.tar.gz
btrfs-progs-250a58f34d57588de8f0b2f118cb5cd152744158.tar.xz
btrfs-progs-250a58f34d57588de8f0b2f118cb5cd152744158.zip
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.c2
-rw-r--r--btrfs-list.h6
-rw-r--r--btrfsck.h2
-rw-r--r--cmds-fi-usage.h3
-rw-r--r--disk-io.h3
-rw-r--r--free-space-cache.h4
-rw-r--r--ioctl.h7
-rw-r--r--qgroup-verify.h3
-rw-r--r--qgroup.h2
-rw-r--r--repair.h2
-rw-r--r--send-stream.h6
-rw-r--r--send-utils.h2
-rw-r--r--transaction.h3
-rw-r--r--volumes.h3
14 files changed, 42 insertions, 6 deletions
diff --git a/btrfs-list.c b/btrfs-list.c
index 3e29cf8..875a89d 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 4b21300..13f44c3 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
diff --git a/btrfsck.h b/btrfsck.h
index e58c55a..0882a38 100644
--- a/btrfsck.h
+++ b/btrfsck.h
@@ -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 c8061d1..adb8ad3 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);
diff --git a/disk-io.h b/disk-io.h
index 62eb566..2d625da 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -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 f2e71a5..85411a1 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;
diff --git a/ioctl.h b/ioctl.h
index dfc4602..dff015a 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -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 174ed45..7d91c19 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);
diff --git a/qgroup.h b/qgroup.h
index 22737fa..5886fc3 100644
--- a/qgroup.h
+++ b/qgroup.h
@@ -19,8 +19,8 @@
#ifndef __BTRFS_QGROUP_H__
#define __BTRFS_QGROUP_H__
-#include "ioctl.h"
#include "kerncompat.h"
+#include "ioctl.h"
struct btrfs_qgroup;
diff --git a/repair.h b/repair.h
index 3d04e6d..3fc0e8b 100644
--- a/repair.h
+++ b/repair.h
@@ -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 133a310..39901f8 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 0f38b5a..d28c8d5 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 c5780bc..13e09a6 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;
diff --git a/volumes.h b/volumes.h
index 40ed123..99a3fa1 100644
--- a/volumes.h
+++ b/volumes.h
@@ -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 {