]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
mkfs: move mkfs/proto.c declarations to mkfs/proto.h
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 Sep 2021 20:57:05 +0000 (16:57 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 29 Sep 2021 20:57:05 +0000 (16:57 -0400)
These functions are only used by mkfs, so move them to a separate header
file that isn't in an internal library.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
[sandeen: cosmetic tidyups as suggested by Christoph]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_multidisk.h
mkfs/proto.c
mkfs/proto.h [new file with mode: 0644]
mkfs/xfs_mkfs.c

index abfb50ce2c8615c1d28df2c499ee37e3da89cf34..a16a9fe27c6ae90140e61d02460a1b917b926594 100644 (file)
@@ -42,9 +42,4 @@
 #define XFS_NOMULTIDISK_AGLOG          2       /* 4 AGs */
 #define XFS_MULTIDISK_AGCOUNT          (1 << XFS_MULTIDISK_AGLOG)
 
-/* proto.c */
-extern char *setup_proto (char *fname);
-extern void parse_proto (xfs_mount_t *mp, struct fsxattr *fsx, char **pp);
-extern void res_failed (int err);
-
 #endif /* __XFS_MULTIDISK_H__ */
index 6b22cc6a9d09925aa512a1dc74bde01398986b29..ef130ed625a5b5a9e893168d9b92de69ca2570b1 100644 (file)
@@ -7,6 +7,7 @@
 #include "libxfs.h"
 #include <sys/stat.h>
 #include "libfrog/convert.h"
+#include "proto.h"
 
 /*
  * Prototypes for internal functions.
diff --git a/mkfs/proto.h b/mkfs/proto.h
new file mode 100644 (file)
index 0000000..3c4010a
--- /dev/null
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2000-2001,2004-2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+#ifndef MKFS_PROTO_H_
+#define MKFS_PROTO_H_
+
+char *setup_proto(char *fname);
+void parse_proto(struct xfs_mount *mp, struct fsxattr *fsx, char **pp);
+void res_failed(int err);
+
+#endif /* MKFS_PROTO_H_ */
index 9c14c04eae280b0a0988930f0081439ea93dfd88..16e347e5b1fda5c79b716dab01fbc33e25c913ee 100644 (file)
@@ -11,6 +11,7 @@
 #include "libfrog/fsgeom.h"
 #include "libfrog/topology.h"
 #include "libfrog/convert.h"
+#include "proto.h"
 #include <ini.h>
 
 #define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))