@@ -17,22 +17,4 @@ typedef struct parent_cursor {
__u32 opaque[4]; /* an opaque cookie */
} parent_cursor_t;
-struct path_list;
-
-typedef int (*walk_pptr_fn)(struct xfs_pptr_info *pi, struct xfs_parent_ptr *pptr,
- void *arg);
-typedef int (*walk_ppath_fn)(const char *mntpt, struct path_list *path,
- void *arg);
-
-#define WALK_PPTRS_ABORT 1
-int fd_walk_pptrs(int fd, walk_pptr_fn fn, void *arg);
-int handle_walk_pptrs(void *hanp, size_t hanlen, walk_pptr_fn fn, void *arg);
-
-#define WALK_PPATHS_ABORT 1
-int fd_walk_ppaths(int fd, walk_ppath_fn fn, void *arg);
-int handle_walk_ppaths(void *hanp, size_t hanlen, walk_ppath_fn fn, void *arg);
-
-int fd_to_path(int fd, char *path, size_t pathlen);
-int handle_to_path(void *hanp, size_t hlen, char *path, size_t pathlen);
-
#endif
@@ -8,6 +8,7 @@
#include "input.h"
#include "libfrog/paths.h"
#include "parent.h"
+#include "libfrog/pptrs.h"
#include "handle.h"
#include "init.h"
#include "io.h"
@@ -23,6 +23,7 @@ list_sort.c \
linux.c \
logging.c \
paths.c \
+pptrs.c \
projects.c \
ptvar.c \
radix-tree.c \
@@ -42,6 +43,7 @@ crc32table.h \
fsgeom.h \
logging.h \
paths.h \
+pptrs.h \
projects.h \
ptvar.h \
radix-tree.h \
similarity index 87%
rename from libhandle/parent.c
rename to libfrog/pptrs.c
@@ -1,21 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (C) 2017 Oracle. All Rights Reserved.
- *
- * Author: Darrick J. Wong <darrick.wong@oracle.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Copyright (C) 2023 Oracle. All Rights Reserved.
+ * Author: Darrick J. Wong <djwong@kernel.org>
*/
#include "platform_defs.h"
#include "xfs.h"
@@ -23,7 +9,7 @@
#include "list.h"
#include "libfrog/paths.h"
#include "handle.h"
-#include "parent.h"
+#include "libfrog/pptrs.h"
/* Allocate a buffer large enough for some parent pointer records. */
static inline struct xfs_pptr_info *
new file mode 100644
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2023 Oracle. All Rights Reserved.
+ * Author: Darrick J. Wong <djwong@kernel.org>
+ */
+#ifndef __LIBFROG_PPTRS_H_
+#define __LIBFROG_PPTRS_H_
+
+struct path_list;
+
+typedef int (*walk_pptr_fn)(struct xfs_pptr_info *pi, struct xfs_parent_ptr *pptr,
+ void *arg);
+typedef int (*walk_ppath_fn)(const char *mntpt, struct path_list *path,
+ void *arg);
+
+#define WALK_PPTRS_ABORT 1
+int fd_walk_pptrs(int fd, walk_pptr_fn fn, void *arg);
+int handle_walk_pptrs(void *hanp, size_t hanlen, walk_pptr_fn fn, void *arg);
+
+#define WALK_PPATHS_ABORT 1
+int fd_walk_ppaths(int fd, walk_ppath_fn fn, void *arg);
+int handle_walk_ppaths(void *hanp, size_t hanlen, walk_ppath_fn fn, void *arg);
+
+int fd_to_path(int fd, char *path, size_t pathlen);
+int handle_to_path(void *hanp, size_t hlen, char *path, size_t pathlen);
+
+#endif /* __LIBFROG_PPTRS_H_ */
@@ -12,7 +12,7 @@ LT_AGE = 0
LTLDFLAGS += -Wl,--version-script,libhandle.sym
-CFILES = handle.c jdm.c parent.c
+CFILES = handle.c jdm.c
LSRCFILES = libhandle.sym
default: ltdepend $(LTLIBRARY)