]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix attr include mess
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 6 Jun 2019 13:58:30 +0000 (08:58 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 6 Jun 2019 13:58:30 +0000 (08:58 -0500)
Remove all the userspace xfs_attr shim cruft so that we have one
definition of ATTR_* macros so that we can actually use xfs_attr.c
routines and include xfs_attr.h without problems.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/libxfs.h
libxfs/libxfs_api_defs.h
libxfs/libxfs_priv.h
libxfs/xfs_attr.c
libxfs/xfs_attr_leaf.c

index 230bc3e8b0eb9617e8487f9149b83b35060a0c80..dd5fe5427c2bfbb52dde7a6aa43865962ec41005 100644 (file)
@@ -211,14 +211,6 @@ libxfs_bmbt_disk_get_all(
 int libxfs_rtfree_extent(struct xfs_trans *, xfs_rtblock_t, xfs_extlen_t);
 bool libxfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
 
-/* XXX: need parts of xfs_attr.h in userspace */
-#define LIBXFS_ATTR_ROOT       0x0002  /* use attrs in root namespace */
-#define LIBXFS_ATTR_SECURE     0x0008  /* use attrs in security namespace */
-#define LIBXFS_ATTR_CREATE     0x0010  /* create, but fail if attr exists */
-#define LIBXFS_ATTR_REPLACE    0x0020  /* set, but fail if attr not exists */
-
-int xfs_attr_remove(struct xfs_inode *dp, const unsigned char *name, int flags);
-int xfs_attr_set(struct xfs_inode *dp, const unsigned char *name,
-                unsigned char *value, int valuelen, int flags);
+#include "xfs_attr.h"
 
 #endif /* __LIBXFS_H__ */
index 1150ec9316093902a9e019989f7fc3f75e1c8058..34bb552d89ba15d63695343a78b527594b847b78 100644 (file)
 #define xfs_fs_geometry                        libxfs_fs_geometry
 #define xfs_init_local_fork            libxfs_init_local_fork
 
+#define LIBXFS_ATTR_ROOT               ATTR_ROOT
+#define LIBXFS_ATTR_SECURE             ATTR_SECURE
+#define LIBXFS_ATTR_CREATE             ATTR_CREATE
+#define LIBXFS_ATTR_REPLACE            ATTR_REPLACE
+
 #endif /* __LIBXFS_API_DEFS_H__ */
index c75b92dea62a64228fe1fa4fc683186fa0be57cd..3fe313197469a2e99e4310b7867fb287a007394d 100644 (file)
@@ -104,14 +104,6 @@ extern char    *progname;
  */
 #define PTR_FMT "%p"
 
-/* XXX: need to push these out to make LIBXFS_ATTR defines */
-#define ATTR_ROOT                      0x0002
-#define ATTR_SECURE                    0x0008
-#define ATTR_CREATE                    0x0010
-#define ATTR_REPLACE                   0x0020
-#define ATTR_KERNOTIME                 0
-#define ATTR_KERNOVAL                  0
-
 #define XFS_IGET_CREATE                        0x1
 #define XFS_IGET_UNTRUSTED             0x2
 
index b88383023d6912bb1e6b1e935b45b985a7eb764a..170e64cf00d7ed409992c18f109eb801da550f4d 100644 (file)
@@ -20,6 +20,7 @@
 #include "xfs_trans.h"
 #include "xfs_bmap.h"
 #include "xfs_bmap_btree.h"
+#include "xfs_attr.h"
 #include "xfs_attr_leaf.h"
 #include "xfs_attr_remote.h"
 #include "xfs_trans_space.h"
index 679c7d0db800120387fa1068c08b72a1d438d7f6..1027ca010216feb146d7aca38d5d124acfbcd6cf 100644 (file)
@@ -21,6 +21,7 @@
 #include "xfs_bmap.h"
 #include "xfs_attr_sf.h"
 #include "xfs_attr_remote.h"
+#include "xfs_attr.h"
 #include "xfs_attr_leaf.h"
 #include "xfs_trace.h"
 #include "xfs_cksum.h"