From a44e9006f25b5c655e68b285319a781d0bf61b7a Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Fri, 19 Dec 2014 10:51:22 +1100 Subject: [PATCH] libxfs: disambiguate xfs.h There are two "xfs.h" header files in xfsprogs. include/xfs.h contains the userspace API definitions for the platform and ioctl interfaces. libxfs/support/xfs.h contains support infrastructure to allow kernel code to compile in userspace. They have different purposes, and so we need to disambiguate them so it is clear what header files are being included in which files. We can't change include/xfs.h as it is exported and installed into /usr/include/xfs, and that means we have to rename the libxfs internal header file. Rename this to "libxfs_priv.h" so it is clear that it is private to libxfs, and update all the libxfs code to include it. Signed-off-by: Dave Chinner --- libxfs/Makefile | 6 +++--- libxfs/support/cache.c | 2 +- libxfs/support/init.c | 2 +- libxfs/support/kmem.c | 2 +- libxfs/support/{xfs.h => libxfs_priv.h} | 0 libxfs/support/linux.c | 2 +- libxfs/support/logitem.c | 2 +- libxfs/support/rdwr.c | 4 ++-- libxfs/support/trans.c | 2 +- libxfs/support/util.c | 2 +- libxfs/xfs_alloc.c | 2 +- libxfs/xfs_alloc_btree.c | 2 +- libxfs/xfs_attr.c | 2 +- libxfs/xfs_attr_leaf.c | 2 +- libxfs/xfs_attr_remote.c | 2 +- libxfs/xfs_bmap.c | 2 +- libxfs/xfs_bmap_btree.c | 2 +- libxfs/xfs_btree.c | 2 +- libxfs/xfs_da_btree.c | 2 +- libxfs/xfs_da_format.c | 2 +- libxfs/xfs_dir2.c | 2 +- libxfs/xfs_dir2_block.c | 2 +- libxfs/xfs_dir2_data.c | 2 +- libxfs/xfs_dir2_leaf.c | 2 +- libxfs/xfs_dir2_node.c | 2 +- libxfs/xfs_dir2_sf.c | 2 +- libxfs/xfs_dquot_buf.c | 2 +- libxfs/xfs_ialloc.c | 2 +- libxfs/xfs_ialloc_btree.c | 2 +- libxfs/xfs_inode_buf.c | 2 +- libxfs/xfs_inode_fork.c | 2 +- libxfs/xfs_log_rlimit.c | 2 +- libxfs/xfs_rtbitmap.c | 2 +- libxfs/xfs_sb.c | 2 +- libxfs/xfs_symlink_remote.c | 2 +- libxfs/xfs_trans_resv.c | 2 +- 36 files changed, 38 insertions(+), 38 deletions(-) rename libxfs/support/{xfs.h => libxfs_priv.h} (100%) diff --git a/libxfs/Makefile b/libxfs/Makefile index 95c33fc00..0afdcaf99 100644 --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -15,10 +15,10 @@ PKGHFILES = xfs_fs.h \ xfs_types.h # headers with build dependencies -SHFILES = xfs.h \ - init.h \ +SHFILES = init.h \ crc32defs.h \ - crc32table.h + crc32table.h \ + libxfs_priv.h HFILES = $(addprefix support/, $(SHFILES)) \ xfs_dir2_priv.h diff --git a/libxfs/support/cache.c b/libxfs/support/cache.c index 105d2f976..4753a1d78 100644 --- a/libxfs/support/cache.c +++ b/libxfs/support/cache.c @@ -22,7 +22,7 @@ #include #include -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/support/init.c b/libxfs/support/init.c index 42fa7af66..6f404aaa8 100644 --- a/libxfs/support/init.c +++ b/libxfs/support/init.c @@ -19,7 +19,7 @@ #include #include "init.h" -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/support/kmem.c b/libxfs/support/kmem.c index c2b91fd9c..6421304b0 100644 --- a/libxfs/support/kmem.c +++ b/libxfs/support/kmem.c @@ -1,6 +1,6 @@ -#include "xfs.h" +#include "libxfs_priv.h" /* * Simple memory interface diff --git a/libxfs/support/xfs.h b/libxfs/support/libxfs_priv.h similarity index 100% rename from libxfs/support/xfs.h rename to libxfs/support/libxfs_priv.h diff --git a/libxfs/support/linux.c b/libxfs/support/linux.c index f16a51c71..885016a01 100644 --- a/libxfs/support/linux.c +++ b/libxfs/support/linux.c @@ -25,7 +25,7 @@ #include #include -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" int platform_has_uuid = 1; diff --git a/libxfs/support/logitem.c b/libxfs/support/logitem.c index 31d800593..ea85e7293 100644 --- a/libxfs/support/logitem.c +++ b/libxfs/support/logitem.c @@ -16,7 +16,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/support/rdwr.c b/libxfs/support/rdwr.c index 9f8d600ca..03d6fc30f 100644 --- a/libxfs/support/rdwr.c +++ b/libxfs/support/rdwr.c @@ -17,7 +17,7 @@ */ -#include "xfs.h" +#include "libxfs_priv.h" #include "init.h" #include "xfs_fs.h" #include "xfs_shared.h" @@ -30,7 +30,7 @@ #include "xfs_inode.h" #include "xfs_trans.h" -#include /* for now */ +#include /* for LIBXFS_EXIT_ON_FAILURE */ /* * Important design/architecture note: diff --git a/libxfs/support/trans.c b/libxfs/support/trans.c index a24057b71..244776462 100644 --- a/libxfs/support/trans.c +++ b/libxfs/support/trans.c @@ -17,7 +17,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/support/util.c b/libxfs/support/util.c index 0eeb58677..ba5026c26 100644 --- a/libxfs/support/util.c +++ b/libxfs/support/util.c @@ -16,7 +16,7 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "init.h" #include "xfs_fs.h" #include "xfs_shared.h" diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 98d794dd4..d913a25a6 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_alloc_btree.c b/libxfs/xfs_alloc_btree.c index 20a072dd9..7fd72af95 100644 --- a/libxfs/xfs_alloc_btree.c +++ b/libxfs/xfs_alloc_btree.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 00a319bd6..f8c24f6d8 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 418138bae..714c25728 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_attr_remote.c b/libxfs/xfs_attr_remote.c index 356b2e00e..4f492c18c 100644 --- a/libxfs/xfs_attr_remote.c +++ b/libxfs/xfs_attr_remote.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 1e2d38541..c4e9da6fa 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c index f1ad2f979..2fd04e0cd 100644 --- a/libxfs/xfs_bmap_btree.c +++ b/libxfs/xfs_bmap_btree.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_btree.c b/libxfs/xfs_btree.c index c7933d7ec..d87883454 100644 --- a/libxfs/xfs_btree.c +++ b/libxfs/xfs_btree.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_da_btree.c b/libxfs/xfs_da_btree.c index 0f84d102e..54ff154d2 100644 --- a/libxfs/xfs_da_btree.c +++ b/libxfs/xfs_da_btree.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_da_format.c b/libxfs/xfs_da_format.c index 9d624a622..e4c37f948 100644 --- a/libxfs/xfs_da_format.c +++ b/libxfs/xfs_da_format.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c index 9ad9540d4..2a42317ab 100644 --- a/libxfs/xfs_dir2.c +++ b/libxfs/xfs_dir2.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dir2_block.c b/libxfs/xfs_dir2_block.c index 4ca3cc56b..79821fa69 100644 --- a/libxfs/xfs_dir2_block.c +++ b/libxfs/xfs_dir2_block.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dir2_data.c b/libxfs/xfs_dir2_data.c index 894691696..ca53e1b01 100644 --- a/libxfs/xfs_dir2_data.c +++ b/libxfs/xfs_dir2_data.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dir2_leaf.c b/libxfs/xfs_dir2_leaf.c index 8636b27c8..b8e1355ed 100644 --- a/libxfs/xfs_dir2_leaf.c +++ b/libxfs/xfs_dir2_leaf.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dir2_node.c b/libxfs/xfs_dir2_node.c index d7e68503f..00945e0a8 100644 --- a/libxfs/xfs_dir2_node.c +++ b/libxfs/xfs_dir2_node.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c index f549afef0..e4b505b8b 100644 --- a/libxfs/xfs_dir2_sf.c +++ b/libxfs/xfs_dir2_sf.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c index 85827985f..2e0484a6f 100644 --- a/libxfs/xfs_dquot_buf.c +++ b/libxfs/xfs_dquot_buf.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c index 15e3a39ec..7b2570036 100644 --- a/libxfs/xfs_ialloc.c +++ b/libxfs/xfs_ialloc.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_ialloc_btree.c b/libxfs/xfs_ialloc_btree.c index fd62c7f90..9ac143a5e 100644 --- a/libxfs/xfs_ialloc_btree.c +++ b/libxfs/xfs_ialloc_btree.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_inode_buf.c b/libxfs/xfs_inode_buf.c index a7cbd8955..fd48f043b 100644 --- a/libxfs/xfs_inode_buf.c +++ b/libxfs/xfs_inode_buf.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_inode_fork.c b/libxfs/xfs_inode_fork.c index 334ff86b4..e1968b43e 100644 --- a/libxfs/xfs_inode_fork.c +++ b/libxfs/xfs_inode_fork.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_log_rlimit.c b/libxfs/xfs_log_rlimit.c index c10597973..9264afa92 100644 --- a/libxfs/xfs_log_rlimit.c +++ b/libxfs/xfs_log_rlimit.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c index a4201566d..0054432c1 100644 --- a/libxfs/xfs_rtbitmap.c +++ b/libxfs/xfs_rtbitmap.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index 37e2151d4..4d41d42e9 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -15,7 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" diff --git a/libxfs/xfs_symlink_remote.c b/libxfs/xfs_symlink_remote.c index 1deea8266..dcfb6d89d 100644 --- a/libxfs/xfs_symlink_remote.c +++ b/libxfs/xfs_symlink_remote.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_format.h" #include "xfs_log_format.h" diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c index 3034ccbf4..d81ce08e3 100644 --- a/libxfs/xfs_trans_resv.c +++ b/libxfs/xfs_trans_resv.c @@ -16,7 +16,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "xfs.h" +#include "libxfs_priv.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" -- 2.47.2