]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: move topology declarations into separate header
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Sep 2019 19:37:05 +0000 (15:37 -0400)
committerEric Sandeen <sandeen@redhat.com>
Mon, 9 Sep 2019 19:37:05 +0000 (15:37 -0400)
The topology functions live in libfrog now, which means their
declarations don't belong in libxcmd.h.  Create new header file for
them.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/libxcmd.h
libfrog/Makefile
libfrog/topology.c
libfrog/topology.h [new file with mode: 0644]
mkfs/xfs_mkfs.c
repair/sb.c

index 20e5d8347209c4956d15a519c1876bbb74e969fc..7b889b0ae892b82c998347a135d4052238af1fae 100644 (file)
 #include "libxfs.h"
 #include <sys/time.h>
 
-/*
- * Device topology information.
- */
-typedef struct fs_topology {
-       int     dsunit;         /* stripe unit - data subvolume */
-       int     dswidth;        /* stripe width - data subvolume */
-       int     rtswidth;       /* stripe width - rt subvolume */
-       int     lsectorsize;    /* logical sector size &*/
-       int     psectorsize;    /* physical sector size */
-} fs_topology_t;
-
-extern void
-get_topology(
-       libxfs_init_t           *xi,
-       struct fs_topology      *ft,
-       int                     force_overwrite);
-
-extern void
-calc_default_ag_geometry(
-       int             blocklog,
-       uint64_t        dblocks,
-       int             multidisk,
-       uint64_t        *agsize,
-       uint64_t        *agcount);
-
-extern int
-check_overwrite(
-       const char      *device);
-
-
-
 #endif /* __LIBXCMD_H__ */
index 4f6a54abc2fd83ad130ca92f7bac0906d72aefa8..37976029788db8f264999feb7bd6dd4d4acff5b3 100644 (file)
@@ -30,7 +30,8 @@ workqueue.c
 HFILES = \
 bulkstat.h \
 crc32defs.h \
-crc32table.h
+crc32table.h \
+topology.h
 
 LSRCFILES += gen_crc32table.c
 
index cac164f37fe0c32e1da60ded9935c86e5f630fb1..e2f8741556a107e424bb61b1525e3d4e1593a2a6 100644 (file)
@@ -10,6 +10,7 @@
 #  include <blkid/blkid.h>
 #endif /* ENABLE_BLKID */
 #include "xfs_multidisk.h"
+#include "topology.h"
 
 #define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))
 #define GIGABYTES(count, blog) ((uint64_t)(count) << (30 - (blog)))
diff --git a/libfrog/topology.h b/libfrog/topology.h
new file mode 100644 (file)
index 0000000..6fde868
--- /dev/null
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+
+#ifndef __LIBFROG_TOPOLOGY_H__
+#define __LIBFROG_TOPOLOGY_H__
+
+/*
+ * Device topology information.
+ */
+typedef struct fs_topology {
+       int     dsunit;         /* stripe unit - data subvolume */
+       int     dswidth;        /* stripe width - data subvolume */
+       int     rtswidth;       /* stripe width - rt subvolume */
+       int     lsectorsize;    /* logical sector size &*/
+       int     psectorsize;    /* physical sector size */
+} fs_topology_t;
+
+extern void
+get_topology(
+       libxfs_init_t           *xi,
+       struct fs_topology      *ft,
+       int                     force_overwrite);
+
+extern void
+calc_default_ag_geometry(
+       int             blocklog,
+       uint64_t        dblocks,
+       int             multidisk,
+       uint64_t        *agsize,
+       uint64_t        *agcount);
+
+extern int
+check_overwrite(
+       const char      *device);
+
+#endif /* __LIBFROG_TOPOLOGY_H__ */
index 0bdf6ec3b1bb32388d51537e6d5013a556edc6d5..fd6823c5be9b5acb1226282366e0cf6aaca3a400 100644 (file)
@@ -9,7 +9,7 @@
 #include "xfs_multidisk.h"
 #include "libxcmd.h"
 #include "fsgeom.h"
-
+#include "libfrog/topology.h"
 
 #define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))
 #define GIGABYTES(count, blog) ((uint64_t)(count) << (30 - (blog)))
index 119bf2190b13f6b0c9548d8e1592b44c0a0c6b99..3955dfba2ba21ccf12155ded9d6d2f42f7661e77 100644 (file)
@@ -12,6 +12,7 @@
 #include "protos.h"
 #include "err_protos.h"
 #include "xfs_multidisk.h"
+#include "libfrog/topology.h"
 
 #define BSIZE  (1024 * 1024)