git: 90412431fe1b - main - stand: make zfs_parsedev static

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 30 Nov 2022 22:31:21 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=90412431fe1bf5f4a10b68c7938b0fc9f11dc4a2

commit 90412431fe1bf5f4a10b68c7938b0fc9f11dc4a2
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-11-30 22:09:14 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-11-30 22:30:32 +0000

    stand: make zfs_parsedev static
    
    It's now unreferenced outside of zfs.c.
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D37344
---
 stand/libsa/zfs/devicename_stubs.c | 7 -------
 stand/libsa/zfs/libzfs.h           | 2 --
 stand/libsa/zfs/zfs.c              | 5 ++++-
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/stand/libsa/zfs/devicename_stubs.c b/stand/libsa/zfs/devicename_stubs.c
index 4b1ebca8e5a3..44df5251118a 100644
--- a/stand/libsa/zfs/devicename_stubs.c
+++ b/stand/libsa/zfs/devicename_stubs.c
@@ -30,13 +30,6 @@ __FBSDID("$FreeBSD$");
 #include <stand.h>
 #include "libzfs.h"
 
-__attribute__((weak))
-int
-zfs_parsedev(struct devdesc **dev, const char *devspec, const char **path)
-{
-	return (EINVAL);
-}
-
 __attribute__((weak))
 char *
 zfs_fmtdev(struct devdesc *vdev)
diff --git a/stand/libsa/zfs/libzfs.h b/stand/libsa/zfs/libzfs.h
index a8ce762d2bc2..b6b6cd78f073 100644
--- a/stand/libsa/zfs/libzfs.h
+++ b/stand/libsa/zfs/libzfs.h
@@ -48,8 +48,6 @@ struct zfs_devdesc {
 	uint64_t	root_guid;
 };
 
-int	zfs_parsedev(struct devdesc **dev, const char *devspec,
-		     const char **path);
 char	*zfs_fmtdev(struct devdesc *);
 int	zfs_probe_dev(const char *devname, uint64_t *pool_guid);
 int	zfs_list(const char *name);
diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c
index 96b0509149f8..db4bed7f7697 100644
--- a/stand/libsa/zfs/zfs.c
+++ b/stand/libsa/zfs/zfs.c
@@ -66,6 +66,9 @@ static void	zfs_bootenv_initial(const char *envname, spa_t *spa,
 static void	zfs_checkpoints_initial(spa_t *spa, const char *name,
 		    const char *dsname);
 
+static int	zfs_parsedev(struct devdesc **idev, const char *devspec,
+		    const char **path);
+
 struct devsw zfs_dev;
 
 struct fs_ops zfs_fsops = {
@@ -1629,7 +1632,7 @@ struct devsw zfs_dev = {
 	.dv_parsedev = zfs_parsedev,
 };
 
-int
+static int
 zfs_parsedev(struct devdesc **idev, const char *devspec, const char **path)
 {
 	static char	rootname[ZFS_MAXNAMELEN];