]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
libxfs: hoist listxattr from xfs_repair
authorDarrick J. Wong <djwong@kernel.org>
Fri, 26 Jul 2024 21:08:19 +0000 (14:08 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jul 2024 01:45:40 +0000 (18:45 -0700)
Hoist the listxattr code from xfs_repair so that we can use it in
xfs_db.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/Makefile
libxfs/listxattr.c [moved from repair/listxattr.c with 99% similarity]
libxfs/listxattr.h [moved from repair/listxattr.h with 81% similarity]
repair/Makefile
repair/pptr.c

index 4e8f9a13581879cdf2c33b14ca22027e50cc33a8..2f2791cae5873c962e9f6e1e65fba72e1a6bae66 100644 (file)
@@ -23,6 +23,7 @@ HFILES = \
        defer_item.h \
        libxfs_io.h \
        libxfs_api_defs.h \
+       listxattr.h \
        init.h \
        libxfs_priv.h \
        linux-err.h \
@@ -69,6 +70,7 @@ CFILES = buf_mem.c \
        defer_item.c \
        init.c \
        kmem.c \
+       listxattr.c \
        logitem.c \
        rdwr.c \
        topology.c \
similarity index 99%
rename from repair/listxattr.c
rename to libxfs/listxattr.c
index 2af77b7b2195a35f2c85ca87a9a5e160bfd3360f..bedaca678439e93c62b9a33e53925eacfc6da218 100644 (file)
@@ -6,7 +6,7 @@
 #include "libxfs.h"
 #include "libxlog.h"
 #include "libfrog/bitmap.h"
-#include "repair/listxattr.h"
+#include "listxattr.h"
 
 /* Call a function for every entry in a shortform xattr structure. */
 STATIC int
similarity index 81%
rename from repair/listxattr.h
rename to libxfs/listxattr.h
index 2d26fce0f323d637b70565088694aa78bbb88ec7..cddd96af7c0c0f02b108432f1cdfe89eaa319044 100644 (file)
@@ -3,8 +3,8 @@
  * Copyright (c) 2022-2024 Oracle.  All Rights Reserved.
  * Author: Darrick J. Wong <djwong@kernel.org>
  */
-#ifndef __REPAIR_LISTXATTR_H__
-#define __REPAIR_LISTXATTR_H__
+#ifndef __LIBXFS_LISTXATTR_H__
+#define __LIBXFS_LISTXATTR_H__
 
 typedef int (*xattr_walk_fn)(struct xfs_inode *ip, unsigned int attr_flags,
                const unsigned char *name, unsigned int namelen,
@@ -12,4 +12,4 @@ typedef int (*xattr_walk_fn)(struct xfs_inode *ip, unsigned int attr_flags,
 
 int xattr_walk(struct xfs_inode *ip, xattr_walk_fn attr_fn, void *priv);
 
-#endif /* __REPAIR_LISTXATTR_H__ */
+#endif /* __LIBXFS_LISTXATTR_H__ */
index e7445d53e918908d6e7845715ec6f14508ae0d44..a36a95e353a50497c91985821db3d36381d8c2a2 100644 (file)
@@ -24,7 +24,6 @@ HFILES = \
        err_protos.h \
        globals.h \
        incore.h \
-       listxattr.h \
        pptr.h \
        prefetch.h \
        progress.h \
@@ -59,7 +58,6 @@ CFILES = \
        incore_ext.c \
        incore_ino.c \
        init.c \
-       listxattr.c \
        phase1.c \
        phase2.c \
        phase3.c \
index 8ec6a51d2c3dd556ce2611648133f585185b1d4f..cc66e637217f1d0116a52fc4ce4dd04704efc05c 100644 (file)
@@ -11,7 +11,7 @@
 #include "repair/globals.h"
 #include "repair/err_protos.h"
 #include "repair/slab.h"
-#include "repair/listxattr.h"
+#include "libxfs/listxattr.h"
 #include "repair/threads.h"
 #include "repair/incore.h"
 #include "repair/pptr.h"