From a016903ab3870eafcd8561681e1366d1163e0185 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Mon, 11 May 2015 09:30:14 +1000 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/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 | 4 ++-- libxfs/cache.c | 2 +- libxfs/init.c | 2 +- libxfs/kmem.c | 2 +- libxfs/{xfs.h => libxfs_priv.h} | 0 libxfs/linux.c | 2 +- libxfs/logitem.c | 2 +- libxfs/rdwr.c | 4 ++-- libxfs/trans.c | 2 +- libxfs/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, 37 insertions(+), 37 deletions(-) rename libxfs/{xfs.h => libxfs_priv.h} (100%) diff --git a/libxfs/Makefile b/libxfs/Makefile index 51b98ec67..df4e36910 100644 --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -15,10 +15,10 @@ PKGHFILES = xfs_fs.h \ xfs_types.h # headers with build dependencies -HFILES = xfs.h \ - init.h \ +HFILES = init.h \ crc32defs.h \ crc32table.h \ + libxfs_priv.h \ xfs_dir2_priv.h \ # headers installed in QA targets diff --git a/libxfs/cache.c b/libxfs/cache.c index 105d2f976..4753a1d78 100644 --- a/libxfs/cache.c +++ b/libxfs/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/init.c b/libxfs/init.c index 42fa7af66..6f404aaa8 100644 --- a/libxfs/init.c +++ b/libxfs/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/kmem.c b/libxfs/kmem.c index c2b91fd9c..6421304b0 100644 --- a/libxfs/kmem.c +++ b/libxfs/kmem.c @@ -1,6 +1,6 @@ -#include "xfs.h" +#include "libxfs_priv.h" /* * Simple memory interface diff --git a/libxfs/xfs.h b/libxfs/libxfs_priv.h similarity index 100% rename from libxfs/xfs.h rename to libxfs/libxfs_priv.h diff --git a/libxfs/linux.c b/libxfs/linux.c index f16a51c71..885016a01 100644 --- a/libxfs/linux.c +++ b/libxfs/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/logitem.c b/libxfs/logitem.c index 31d800593..ea85e7293 100644 --- a/libxfs/logitem.c +++ b/libxfs/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/rdwr.c b/libxfs/rdwr.c index aeaae45be..cb172064f 100644 --- a/libxfs/rdwr.c +++ b/libxfs/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/trans.c b/libxfs/trans.c index 8d0eed734..885c5f4dc 100644 --- a/libxfs/trans.c +++ b/libxfs/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/util.c b/libxfs/util.c index 41cc155f4..a6b1fd1f5 100644 --- a/libxfs/util.c +++ b/libxfs/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 15b4e1715..23e3c5387 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 01173a743..200bd30c1 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 55a2a25e4..e6d1e6c0d 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 6c460611d..203e7d20f 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 a7502aecb..441bef4ec 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 d949c6363..f061a99a3 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 3d13011ea..609c097bb 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 4c813864e..c2dba8a4e 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 ecda1ddb2..3b71e9e51 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 841bde5e4..2b4e4e077 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 561fdd2f0..28085b329 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 e5cba591b..6844cd8c3 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 aad3df8a1..6bc5af530 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 2bb622da7..0c40b528d 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