@@ -10,7 +10,7 @@
#include "jdm.h"
#include "xfs_bmap_btree.h"
#include "xfs_attr_sf.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/fsgeom.h"
#include "libfrog/bulkstat.h"
@@ -5,7 +5,7 @@
*/
#include "libxfs.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/fsgeom.h"
static void
@@ -28,7 +28,6 @@ LIBHFILES = libxfs.h \
xfs_trans.h \
command.h \
input.h \
- path.h \
project.h \
platform_defs.h
deleted file mode 100644
@@ -1,61 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (c) 2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- */
-#ifndef __PATH_H__
-#define __PATH_H__
-
-#include "platform_defs.h"
-
-/*
- * XFS Filesystem Paths
- *
- * Utility routines for iterating and searching through the list
- * of known mounted filesystems and project paths.
- */
-
-#define FS_MOUNT_POINT (1<<0)
-#define FS_PROJECT_PATH (1<<1)
-#define FS_FOREIGN (1<<2)
-
-typedef struct fs_path {
- char *fs_name; /* Data device for filesystem */
- dev_t fs_datadev;
- char *fs_log; /* External log device, if any */
- dev_t fs_logdev;
- char *fs_rt; /* Realtime device, if any */
- dev_t fs_rtdev;
- char *fs_dir; /* Directory / mount point */
- uint fs_flags; /* FS_{MOUNT_POINT,PROJECT_PATH}*/
- uint fs_prid; /* Project ID for tree root */
-} fs_path_t;
-
-extern int fs_count; /* number of entries in fs table */
-extern int xfs_fs_count; /* number of xfs entries in fs table */
-extern fs_path_t *fs_table; /* array of entries in fs table */
-extern fs_path_t *fs_path; /* current entry in the fs table */
-extern char *mtab_file;
-
-extern void fs_table_initialise(int, char *[], int, char *[]);
-extern void fs_table_destroy(void);
-
-extern void fs_table_insert_project_path(char *__dir, uint __projid);
-
-
-extern fs_path_t *fs_table_lookup(const char *__dir, uint __flags);
-extern fs_path_t *fs_table_lookup_mount(const char *__dir);
-extern fs_path_t *fs_table_lookup_blkdev(const char *bdev);
-
-typedef struct fs_cursor {
- uint count; /* total count of mount entries */
- uint index; /* current position in table */
- uint flags; /* iterator flags: mounts/trees */
- fs_path_t *table; /* local/global table pointer */
- fs_path_t local; /* space for single-entry table */
-} fs_cursor_t;
-
-extern void fs_cursor_initialise(char *__dir, uint __flags, fs_cursor_t *__cp);
-extern fs_path_t *fs_cursor_next_entry(fs_cursor_t *__cp);
-
-#endif /* __PATH_H__ */
@@ -14,7 +14,7 @@
#include "init.h"
#include "io.h"
#include "input.h"
-#include "path.h"
+#include "libfrog/paths.h"
static cmdinfo_t cowextsize_cmd;
static long cowextsize;
@@ -7,7 +7,7 @@
#include "platform_defs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "io.h"
#ifndef ARRAY_SIZE
@@ -6,7 +6,7 @@
#include "platform_defs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "io.h"
#include "input.h"
#include "libfrog/fsgeom.h"
@@ -5,7 +5,7 @@
*/
#include "xfs.h"
-#include "path.h"
+#include "libfrog/paths.h"
/*
* Read/write patterns (default is always "forward")
@@ -6,7 +6,7 @@
#include <sys/ioctl.h>
#include "platform_defs.h"
#include "libxfs.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "command.h"
#include "init.h"
#include "io.h"
@@ -6,7 +6,7 @@
#include "command.h"
#include "input.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "parent.h"
#include "handle.h"
#include "jdm.h"
@@ -9,7 +9,7 @@
#include "command.h"
#include "input.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "io.h"
static struct cmdinfo scrub_cmd;
@@ -37,6 +37,7 @@ crc32cselftest.h \
crc32defs.h \
crc32table.h \
fsgeom.h \
+paths.h \
ptvar.h \
radix-tree.h \
topology.h \
@@ -12,7 +12,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include "path.h"
+#include "paths.h"
#include "input.h"
#include "project.h"
#include <limits.h>
new file mode 100644
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+#ifndef __LIBFROG_PATH_H__
+#define __LIBFROG_PATH_H__
+
+#include "platform_defs.h"
+
+/*
+ * XFS Filesystem Paths
+ *
+ * Utility routines for iterating and searching through the list
+ * of known mounted filesystems and project paths.
+ */
+
+#define FS_MOUNT_POINT (1<<0)
+#define FS_PROJECT_PATH (1<<1)
+#define FS_FOREIGN (1<<2)
+
+typedef struct fs_path {
+ char *fs_name; /* Data device for filesystem */
+ dev_t fs_datadev;
+ char *fs_log; /* External log device, if any */
+ dev_t fs_logdev;
+ char *fs_rt; /* Realtime device, if any */
+ dev_t fs_rtdev;
+ char *fs_dir; /* Directory / mount point */
+ uint fs_flags; /* FS_{MOUNT_POINT,PROJECT_PATH}*/
+ uint fs_prid; /* Project ID for tree root */
+} fs_path_t;
+
+extern int fs_count; /* number of entries in fs table */
+extern int xfs_fs_count; /* number of xfs entries in fs table */
+extern fs_path_t *fs_table; /* array of entries in fs table */
+extern fs_path_t *fs_path; /* current entry in the fs table */
+extern char *mtab_file;
+
+extern void fs_table_initialise(int, char *[], int, char *[]);
+extern void fs_table_destroy(void);
+
+extern void fs_table_insert_project_path(char *__dir, uint __projid);
+
+
+extern fs_path_t *fs_table_lookup(const char *__dir, uint __flags);
+extern fs_path_t *fs_table_lookup_mount(const char *__dir);
+extern fs_path_t *fs_table_lookup_blkdev(const char *bdev);
+
+typedef struct fs_cursor {
+ uint count; /* total count of mount entries */
+ uint index; /* current position in table */
+ uint flags; /* iterator flags: mounts/trees */
+ fs_path_t *table; /* local/global table pointer */
+ fs_path_t local; /* space for single-entry table */
+} fs_cursor_t;
+
+extern void fs_cursor_initialise(char *__dir, uint __flags, fs_cursor_t *__cp);
+extern fs_path_t *fs_cursor_next_entry(fs_cursor_t *__cp);
+
+#endif /* __LIBFROG_PATH_H__ */
@@ -4,7 +4,7 @@
* All Rights Reserved.
*/
-#include "path.h"
+#include "libfrog/paths.h"
#include "command.h"
#include "input.h"
#include "init.h"
@@ -5,7 +5,7 @@
*/
#include "xqm.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "project.h"
#include <stdbool.h>
@@ -8,7 +8,7 @@
#include <sys/statvfs.h>
#include <syslog.h>
#include "platform_defs.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "progress.h"
@@ -18,7 +18,7 @@
#endif
#include "platform_defs.h"
#include "libfrog.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "disk.h"
@@ -10,7 +10,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/statvfs.h>
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "filemap.h"
@@ -10,7 +10,7 @@
#include "platform_defs.h"
#include "xfs_arch.h"
#include "xfs_format.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -12,7 +12,7 @@
#include "xfs_arch.h"
#include "xfs_format.h"
#include "handle.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -16,7 +16,7 @@
#include "libfrog.h"
#include "libfrog/workqueue.h"
#include "input.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "handle.h"
#include "bitops.h"
#include "libfrog/avl64.h"
@@ -8,7 +8,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -8,7 +8,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -9,7 +9,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -14,7 +14,7 @@
#include <linux/fs.h>
#include "handle.h"
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -8,7 +8,7 @@
#include <dirent.h>
#include <sys/statvfs.h>
#include "handle.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <sys/statvfs.h>
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/ptvar.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -8,7 +8,7 @@
#include <pthread.h>
#include <sys/statvfs.h>
#include <time.h>
-#include "path.h"
+#include "libfrog/paths.h"
#include "disk.h"
#include "read_verify.h"
#include "xfs_scrub.h"
@@ -9,7 +9,7 @@
#include <sys/statvfs.h>
#include "libfrog/ptvar.h"
#include "libfrog/workqueue.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "counter.h"
@@ -9,7 +9,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "scrub.h"
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "list.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "progress.h"
@@ -9,7 +9,7 @@
#include <pthread.h>
#include <sys/statvfs.h>
#include "libfrog/workqueue.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "spacemap.h"
@@ -13,7 +13,7 @@
#include <unicode/ustring.h>
#include <unicode/unorm2.h>
#include <unicode/uspoof.h>
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "unicrash.h"
@@ -9,7 +9,7 @@
#include <sys/types.h>
#include <sys/statvfs.h>
#include "handle.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "libfrog/workqueue.h"
#include "xfs_scrub.h"
#include "common.h"
@@ -12,7 +12,7 @@
#include <sys/statvfs.h>
#include "platform_defs.h"
#include "input.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "xfs_scrub.h"
#include "common.h"
#include "unicrash.h"
@@ -10,7 +10,7 @@
#include "command.h"
#include "input.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
#include "libfrog/fsgeom.h"
@@ -10,7 +10,7 @@
#include <linux/fiemap.h>
#include "command.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
#include "input.h"
@@ -6,7 +6,7 @@
#include "libxfs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
#include "libfrog/fsgeom.h"
@@ -8,7 +8,7 @@
#include "command.h"
#include "input.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
char *progname;
@@ -8,7 +8,7 @@
#include "command.h"
#include "input.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
static cmdinfo_t prealloc_cmd;
@@ -7,7 +7,7 @@
#include "libxfs.h"
#include "command.h"
#include "init.h"
-#include "path.h"
+#include "libfrog/paths.h"
#include "space.h"
#include "input.h"