[PATCH 01/61] mkfs: move mkfs/proto.c declarations to mkfs/proto.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 include/xfs_multidisk.h |    5 -----
 mkfs/proto.c            |    1 +
 mkfs/proto.h            |   13 +++++++++++++
 mkfs/xfs_mkfs.c         |    1 +
 4 files changed, 15 insertions(+), 5 deletions(-)
 create mode 100644 mkfs/proto.h


diff --git a/include/xfs_multidisk.h b/include/xfs_multidisk.h
index abfb50ce..a16a9fe2 100644
--- a/include/xfs_multidisk.h
+++ b/include/xfs_multidisk.h
@@ -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__ */
diff --git a/mkfs/proto.c b/mkfs/proto.c
index 6b22cc6a..ef130ed6 100644
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -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
index 00000000..9ccbddf6
--- /dev/null
+++ b/mkfs/proto.h
@@ -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_
+
+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 /* MKFS_PROTO_H_ */
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 9c14c04e..16e347e5 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -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)))




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux