From: Darrick J. Wong Date: Wed, 29 Sep 2021 20:57:05 +0000 (-0400) Subject: mkfs: move mkfs/proto.c declarations to mkfs/proto.h X-Git-Tag: libxfs-5.14-sync_2021-10-16~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec4e15fd1cbfec1b11bdf81d8cb0eeb1856a8a90;p=thirdparty%2Fxfsprogs-dev.git mkfs: move mkfs/proto.c declarations to mkfs/proto.h 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 Reviewed-by: Christoph Hellwig [sandeen: cosmetic tidyups as suggested by Christoph] Signed-off-by: Eric Sandeen --- diff --git a/include/xfs_multidisk.h b/include/xfs_multidisk.h index abfb50ce2..a16a9fe27 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 6b22cc6a9..ef130ed62 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -7,6 +7,7 @@ #include "libxfs.h" #include #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 000000000..3c4010afd --- /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_ + +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_ */ diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 9c14c04ea..16e347e5b 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 #define TERABYTES(count, blog) ((uint64_t)(count) << (40 - (blog)))