git: 8981a100e614 - main - mount: retire kernel_vmount()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 20 Nov 2021 19:26:03 UTC
The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=8981a100e614d9030eb75e7e828caad48214306d commit 8981a100e614d9030eb75e7e828caad48214306d Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2021-11-20 19:22:28 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2021-11-20 19:22:28 +0000 mount: retire kernel_vmount() The last usage of this function was removed in e3b1c847a4237ad9. There are no in-tree consumers of kernel_vmount(). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D32607 --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 1 - share/man/man9/kernel_mount.9 | 25 +------------------------ sys/kern/vfs_mount.c | 26 -------------------------- sys/sys/mount.h | 1 - 5 files changed, 4 insertions(+), 52 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 00cfe2a33129..9bfd496e334b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,6 +40,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20211120 +OLD_FILES+=usr/share/man/man9/kernel_vmount.9.gz + # 20211115: vm_page busy functions removed OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2bb45e3a6dc8..150b7b5715c0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1313,7 +1313,6 @@ MLINKS+=ithread.9 ithread_add_handler.9 \ ithread.9 ithread_schedule.9 MLINKS+=kernacc.9 useracc.9 MLINKS+=kernel_mount.9 free_mntarg.9 \ - kernel_mount.9 kernel_vmount.9 \ kernel_mount.9 mount_arg.9 \ kernel_mount.9 mount_argb.9 \ kernel_mount.9 mount_argf.9 \ diff --git a/share/man/man9/kernel_mount.9 b/share/man/man9/kernel_mount.9 index 873f522fa1f7..7a11007c288b 100644 --- a/share/man/man9/kernel_mount.9 +++ b/share/man/man9/kernel_mount.9 @@ -25,13 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2004 +.Dd November 20, 2021 .Dt KERNEL_MOUNT 9 .Os .Sh NAME .Nm free_mntarg , .Nm kernel_mount , -.Nm kernel_vmount , .Nm mount_arg , .Nm mount_argb , .Nm mount_argf , @@ -42,8 +41,6 @@ .Fn free_mntarg "struct mntarg *ma" .Ft int .Fn kernel_mount "struct mntarg *ma" "int flags" -.Ft int -.Fn kernel_vmount "int flags" ... .Ft "struct mntarg *" .Fo mount_arg .Fa "struct mntarg *ma" "const char *name" "const void *val" "int len" @@ -100,12 +97,6 @@ that code will be called and the file system mount will not be attempted. .Pp The -.Fn kernel_vmount -is a function similar to -.Xr printf 9 -which is used to mount a file system. -.Pp -The .Fn mount_arg function takes a plain argument and crafts parts of the structure with regards to various mount options. @@ -178,20 +169,6 @@ msdosfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) return (error); } .Ed -.Pp -When working with -.Fn kernel_vmount , -.Fa varargs -must come in pairs, e.g., -.Brq Va name , value . -.Bd -literal - error = kernel_vmount( - MNT_RDONLY, - "fstype", vfsname, - "fspath", "/", - "from", path, - NULL); -.Ed .Sh SEE ALSO .Xr VFS 9 , .Xr VFS_MOUNT 9 diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 5b68a8fec474..07076bc2f4f7 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -2816,32 +2816,6 @@ kernel_mount(struct mntarg *ma, uint64_t flags) return (error); } -/* - * A printflike function to mount a filesystem. - */ -int -kernel_vmount(int flags, ...) -{ - struct mntarg *ma = NULL; - va_list ap; - const char *cp; - const void *vp; - int error; - - va_start(ap, flags); - for (;;) { - cp = va_arg(ap, const char *); - if (cp == NULL) - break; - vp = va_arg(ap, const void *); - ma = mount_arg(ma, cp, vp, (vp != NULL ? -1 : 0)); - } - va_end(ap); - - error = kernel_mount(ma, flags); - return (error); -} - /* Map from mount options to printable formats. */ static struct mntoptnames optnames[] = { MNTOPT_NAMES diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 68211785b7c5..1863a36738d1 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -973,7 +973,6 @@ vfs_statfs_t __vfs_statfs; int dounmount(struct mount *, uint64_t, struct thread *); int kernel_mount(struct mntarg *ma, uint64_t flags); -int kernel_vmount(int flags, ...); struct mntarg *mount_arg(struct mntarg *ma, const char *name, const void *val, int len); struct mntarg *mount_argb(struct mntarg *ma, int flag, const char *name); struct mntarg *mount_argf(struct mntarg *ma, const char *name, const char *fmt, ...);