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>
master
David Sterba 2015-06-10 02:21:42 +02:00
parent 76a9be2e72
commit 250a58f34d
14 changed files with 42 additions and 6 deletions

View File

@ -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"

View File

@ -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

View File

@ -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 */

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -19,8 +19,8 @@
#ifndef __BTRFS_QGROUP_H__
#define __BTRFS_QGROUP_H__
#include "ioctl.h"
#include "kerncompat.h"
#include "ioctl.h"
struct btrfs_qgroup;

View File

@ -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;

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -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 {