btrfs-progs: build: drop kernel-lib from -I and update paths

Include the files by full path to avoid any confusion in case of
potentially duplicate names.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2019-06-20 15:30:57 +02:00
parent c07960c8be
commit 94fced6353
54 changed files with 72 additions and 74 deletions

View File

@ -82,7 +82,6 @@ CFLAGS = $(SUBST_CFLAGS) \
-fno-strict-aliasing \ -fno-strict-aliasing \
-fPIC \ -fPIC \
-I$(TOPDIR) \ -I$(TOPDIR) \
-I$(TOPDIR)/kernel-lib \
-I$(TOPDIR)/libbtrfsutil \ -I$(TOPDIR)/libbtrfsutil \
$(DISABLE_WARNING_FLAGS) \ $(DISABLE_WARNING_FLAGS) \
$(EXTRAWARN_CFLAGS) \ $(EXTRAWARN_CFLAGS) \

View File

@ -29,7 +29,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"

View File

@ -19,7 +19,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/utils.h" #include "common/utils.h"
void print_usage(int status) void print_usage(int status)

View File

@ -29,10 +29,10 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "volumes.h" #include "volumes.h"
#include "common/utils.h" #include "common/utils.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "extent-cache.h" #include "extent-cache.h"
#include "find-root.h" #include "find-root.h"
#include "common/help.h" #include "common/help.h"

View File

@ -21,7 +21,7 @@
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "kerncompat.h" #include "kerncompat.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#include "ioctl.h" #include "ioctl.h"
#else #else
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>

View File

@ -27,7 +27,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"

View File

@ -24,7 +24,7 @@
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <byteswap.h> #include <byteswap.h>
#include <kernel-lib/crc32c.h> #include "kernel-lib/crc32c.h"
#include "disk-io.h" #include "disk-io.h"
#define BLOCKSIZE (4096) #define BLOCKSIZE (4096)

View File

@ -27,7 +27,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"

View File

@ -20,7 +20,7 @@
#include <getopt.h> #include <getopt.h>
#include "volumes.h" #include "volumes.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "common/utils.h" #include "common/utils.h"
#include "common/help.h" #include "common/help.h"

View File

@ -24,7 +24,7 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "extent-cache.h" #include "extent-cache.h"
#include "list.h" #include "kernel-lib/list.h"
#else #else
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>
#include <btrfs/ctree.h> #include <btrfs/ctree.h>

View File

@ -37,9 +37,9 @@
#include "common/utils.h" #include "common/utils.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "kerncompat.h" #include "kerncompat.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#include "interval_tree_generic.h" #include "kernel-lib/interval_tree_generic.h"
#include "common/help.h" #include "common/help.h"
#include "common/fsfeatures.h" #include "common/fsfeatures.h"

View File

@ -37,7 +37,7 @@
#include "volumes.h" #include "volumes.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "cmds/filesystem-usage.h" #include "cmds/filesystem-usage.h"
#include "list_sort.h" #include "kernel-lib/list_sort.h"
#include "disk-io.h" #include "disk-io.h"
#include "common/help.h" #include "common/help.h"
#include "common/fsfeatures.h" #include "common/fsfeatures.h"

View File

@ -29,10 +29,10 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/help.h" #include "common/help.h"
static int check_csum_sblock(void *sb, int csum_size) static int check_csum_sblock(void *sb, int csum_size)

View File

@ -23,7 +23,7 @@
#include <getopt.h> #include <getopt.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"

View File

@ -31,7 +31,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "volumes.h" #include "volumes.h"
#include "common/utils.h" #include "common/utils.h"
#include "cmds/commands.h" #include "cmds/commands.h"

View File

@ -43,7 +43,7 @@
#include "ioctl.h" #include "ioctl.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "common/utils.h" #include "common/utils.h"
#include "list.h" #include "kernel-lib/list.h"
#include "btrfs-list.h" #include "btrfs-list.h"
#include "send.h" #include "send.h"

View File

@ -29,14 +29,14 @@
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include <pthread.h> #include <pthread.h>
#include "list.h" #include "kernel-lib/list.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "extent-cache.h" #include "extent-cache.h"
#include "disk-io.h" #include "disk-io.h"
#include "volumes.h" #include "volumes.h"
#include "transaction.h" #include "transaction.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/utils.h" #include "common/utils.h"
#include "btrfsck.h" #include "btrfsck.h"
#include "cmds/commands.h" #include "cmds/commands.h"

View File

@ -29,9 +29,9 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "volumes.h" #include "volumes.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "cmds/rescue.h" #include "cmds/rescue.h"

View File

@ -41,7 +41,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "list.h" #include "kernel-lib/list.h"
#include "volumes.h" #include "volumes.h"
#include "common/utils.h" #include "common/utils.h"
#include "cmds/commands.h" #include "cmds/commands.h"

View File

@ -38,7 +38,7 @@
#include "ctree.h" #include "ctree.h"
#include "ioctl.h" #include "ioctl.h"
#include "cmds/commands.h" #include "cmds/commands.h"
#include "list.h" #include "kernel-lib/list.h"
#include "common/utils.h" #include "common/utils.h"
#include "send.h" #include "send.h"

View File

@ -43,11 +43,11 @@
#include <btrfsutil.h> #include <btrfsutil.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "transaction.h" #include "transaction.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/utils.h" #include "common/utils.h"
#include "volumes.h" #include "volumes.h"
#include "ioctl.h" #include "ioctl.h"

View File

@ -26,7 +26,7 @@
#include "common-defs.h" #include "common-defs.h"
#include "common/internal.h" #include "common/internal.h"
#include "btrfs-list.h" #include "btrfs-list.h"
#include "sizes.h" #include "kernel-lib/sizes.h"
#include "common/messages.h" #include "common/messages.h"
#include "ioctl.h" #include "ioctl.h"
#include "common/fsfeatures.h" #include "common/fsfeatures.h"

View File

@ -25,7 +25,7 @@
#include "disk-io.h" #include "disk-io.h"
#include "transaction.h" #include "transaction.h"
#include "common/utils.h" #include "common/utils.h"
#include "bitops.h" #include "kernel-lib/bitops.h"
#include "convert/common.h" #include "convert/common.h"
#include "convert/source-reiserfs.h" #include "convert/source-reiserfs.h"

View File

@ -21,7 +21,7 @@
#include "print-tree.h" #include "print-tree.h"
#include "repair.h" #include "repair.h"
#include "common/internal.h" #include "common/internal.h"
#include "sizes.h" #include "kernel-lib/sizes.h"
#include "common/messages.h" #include "common/messages.h"
#include "volumes.h" #include "volumes.h"

View File

@ -22,13 +22,13 @@
#include <stdbool.h> #include <stdbool.h>
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "list.h" #include "kernel-lib/list.h"
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "extent-cache.h" #include "extent-cache.h"
#include "extent_io.h" #include "extent_io.h"
#include "ioctl.h" #include "ioctl.h"
#include "sizes.h" #include "kernel-lib/sizes.h"
#else #else
#include <btrfs/list.h> #include <btrfs/list.h>
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>

View File

@ -24,12 +24,12 @@
#include <unistd.h> #include <unistd.h>
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "volumes.h" #include "volumes.h"
#include "transaction.h" #include "transaction.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/utils.h" #include "common/utils.h"
#include "print-tree.h" #include "print-tree.h"
#include "rbtree-utils.h" #include "rbtree-utils.h"

View File

@ -21,7 +21,7 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "sizes.h" #include "kernel-lib/sizes.h"
#define BTRFS_SUPER_INFO_OFFSET SZ_64K #define BTRFS_SUPER_INFO_OFFSET SZ_64K
#define BTRFS_SUPER_INFO_SIZE 4096 #define BTRFS_SUPER_INFO_SIZE 4096

View File

@ -21,7 +21,7 @@
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "kerncompat.h" #include "kerncompat.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#else #else
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>
#include <btrfs/rbtree.h> #include <btrfs/rbtree.h>

View File

@ -21,12 +21,12 @@
#include <stdint.h> #include <stdint.h>
#include <math.h> #include <math.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"
#include "transaction.h" #include "transaction.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "volumes.h" #include "volumes.h"
#include "free-space-cache.h" #include "free-space-cache.h"
#include "free-space-tree.h" #include "free-space-tree.h"

View File

@ -25,7 +25,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "extent_io.h" #include "extent_io.h"
#include "list.h" #include "kernel-lib/list.h"
#include "ctree.h" #include "ctree.h"
#include "volumes.h" #include "volumes.h"
#include "common/utils.h" #include "common/utils.h"

View File

@ -22,7 +22,7 @@
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "kerncompat.h" #include "kerncompat.h"
#include "extent-cache.h" #include "extent-cache.h"
#include "list.h" #include "kernel-lib/list.h"
#else #else
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>
#include <btrfs/extent-cache.h> #include <btrfs/extent-cache.h>

View File

@ -19,12 +19,12 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "transaction.h" #include "transaction.h"
#include "print-tree.h" #include "print-tree.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/internal.h" #include "common/internal.h"
#define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \ #define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \

View File

@ -22,7 +22,7 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "list.h" #include "kernel-lib/list.h"
#include "extent-cache.h" #include "extent-cache.h"
/* /*

View File

@ -22,8 +22,8 @@
#include "transaction.h" #include "transaction.h"
#include "disk-io.h" #include "disk-io.h"
#include "extent_io.h" #include "extent_io.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "bitops.h" #include "kernel-lib/bitops.h"
#include "common/internal.h" #include "common/internal.h"
#include "common/utils.h" #include "common/utils.h"

View File

@ -21,7 +21,7 @@
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
struct btrfs_free_space { struct btrfs_free_space {
struct rb_node offset_index; struct rb_node offset_index;

View File

@ -22,7 +22,7 @@
#include "free-space-tree.h" #include "free-space-tree.h"
#include "volumes.h" #include "volumes.h"
#include "transaction.h" #include "transaction.h"
#include "bitops.h" #include "kernel-lib/bitops.h"
#include "common/internal.h" #include "common/internal.h"
static struct btrfs_free_space_info * static struct btrfs_free_space_info *

2
hash.h
View File

@ -19,7 +19,7 @@
#ifndef __BTRFS_HASH_H__ #ifndef __BTRFS_HASH_H__
#define __BTRFS_HASH_H__ #define __BTRFS_HASH_H__
#include "crc32c.h" #include "kernel-lib/crc32c.h"
static inline u64 btrfs_name_hash(const char *name, int len) static inline u64 btrfs_name_hash(const char *name, int len)
{ {

View File

@ -28,7 +28,7 @@
#include <getopt.h> #include <getopt.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "transaction.h" #include "transaction.h"

View File

@ -8,7 +8,7 @@
* *
*/ */
#include "kerncompat.h" #include "kerncompat.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>

View File

@ -20,8 +20,7 @@
*/ */
#include <stdbool.h> #include <stdbool.h>
#include "kernel-lib/rbtree_augmented.h"
#include "rbtree_augmented.h"
/* /*
* Template for implementing interval trees * Template for implementing interval trees

View File

@ -4,8 +4,8 @@
*/ */
#include "kerncompat.h" #include "kerncompat.h"
#include "list_sort.h" #include "kernel-lib/list_sort.h"
#include "list.h" #include "kernel-lib/list.h"
#define MAX_LIST_LENGTH_BITS 20 #define MAX_LIST_LENGTH_BITS 20

View File

@ -37,7 +37,7 @@
*/ */
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#ifdef __KERNEL__ #ifdef __KERNEL__
#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) #define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6)
#else #else

View File

@ -21,7 +21,7 @@
linux/lib/rbtree.c linux/lib/rbtree.c
*/ */
#include "rbtree_augmented.h" #include "kernel-lib/rbtree_augmented.h"
/* /*
* red-black trees properties: http://en.wikipedia.org/wiki/Rbtree * red-black trees properties: http://en.wikipedia.org/wiki/Rbtree

View File

@ -24,7 +24,7 @@
#ifndef _LINUX_RBTREE_AUGMENTED_H #ifndef _LINUX_RBTREE_AUGMENTED_H
#define _LINUX_RBTREE_AUGMENTED_H #define _LINUX_RBTREE_AUGMENTED_H
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -9,8 +9,8 @@
#define __ULIST_H__ #define __ULIST_H__
#include "kerncompat.h" #include "kerncompat.h"
#include "list.h" #include "kernel-lib/list.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
/* /*
* ulist is a generic data structure to hold a collection of unique u64 * ulist is a generic data structure to hold a collection of unique u64

View File

@ -19,11 +19,11 @@
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "kerncompat.h" #include "kerncompat.h"
#include "version.h" #include "version.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "list.h" #include "kernel-lib/list.h"
#include "sizes.h" #include "kernel-lib/sizes.h"
#include "ctree.h" #include "ctree.h"
#include "extent_io.h" #include "extent_io.h"
#include "ioctl.h" #include "ioctl.h"

View File

@ -37,7 +37,7 @@
#include "volumes.h" #include "volumes.h"
#include "transaction.h" #include "transaction.h"
#include "common/utils.h" #include "common/utils.h"
#include "list_sort.h" #include "kernel-lib/list_sort.h"
#include "common/help.h" #include "common/help.h"
#include "rbtree-utils.h" #include "rbtree-utils.h"
#include "mkfs/common.h" #include "mkfs/common.h"

View File

@ -20,7 +20,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"

View File

@ -22,7 +22,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"

View File

@ -20,7 +20,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"

View File

@ -20,7 +20,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include "kerncompat.h" #include "kerncompat.h"
#include "radix-tree.h" #include "kernel-lib/radix-tree.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "print-tree.h" #include "print-tree.h"

View File

@ -19,7 +19,7 @@
#ifndef __RBTREE_UTILS__ #ifndef __RBTREE_UTILS__
#define __RBTREE_UTILS__ #define __RBTREE_UTILS__
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -21,7 +21,7 @@
#include "send.h" #include "send.h"
#include "send-stream.h" #include "send-stream.h"
#include "crc32c.h" #include "kernel-lib/crc32c.h"
#include "common/utils.h" #include "common/utils.h"
struct btrfs_send_stream { struct btrfs_send_stream {

View File

@ -22,7 +22,7 @@
#if BTRFS_FLAT_INCLUDES #if BTRFS_FLAT_INCLUDES
#include "kerncompat.h" #include "kerncompat.h"
#include "ctree.h" #include "ctree.h"
#include "rbtree.h" #include "kernel-lib/rbtree.h"
#else #else
#include <btrfs/kerncompat.h> #include <btrfs/kerncompat.h>
#include <btrfs/ctree.h> #include <btrfs/ctree.h>