From 5965373e69ca208cedd8ede9716ef0d58e6c3434 Mon Sep 17 00:00:00 2001 From: Maxime Henrion Date: Sat, 10 Aug 2002 20:19:04 +0000 Subject: - Introduce a new struct xvfsconf, the userland version of struct vfsconf. - Make getvfsbyname() take a struct xvfsconf *. - Convert several consumers of getvfsbyname() to use struct xvfsconf. - Correct the getvfsbyname.3 manpage. - Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the kernel, and rewrite getvfsbyname() to use this instead of the weird existing API. - Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist sysctl. - Convert a vfsload() call in nfsiod.c to kldload() and remove the useless vfsisloadable() and endvfsent() calls. - Add a warning printf() in vfs_sysctl() to tell people they are using an old userland. After these changes, it's possible to modify struct vfsconf without breaking the binary compatibility. Please note that these changes don't break this compatibility either. When bp will have updated mount_smbfs(8) with the patch I sent him, there will be no more consumers of the {set,get,end}vfsent(), vfsisloadable() and vfsload() API, and I will promptly delete it. --- sbin/nfsiod/Makefile | 1 + sbin/nfsiod/nfsiod.8 | 6 ++---- sbin/nfsiod/nfsiod.c | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'sbin/nfsiod') diff --git a/sbin/nfsiod/Makefile b/sbin/nfsiod/Makefile index 47cd290ec78e..22717c576f42 100644 --- a/sbin/nfsiod/Makefile +++ b/sbin/nfsiod/Makefile @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= nfsiod +WARNS?= 6 MAN= nfsiod.8 .include diff --git a/sbin/nfsiod/nfsiod.8 b/sbin/nfsiod/nfsiod.8 index 281c6752ff5a..9131f4151168 100644 --- a/sbin/nfsiod/nfsiod.8 +++ b/sbin/nfsiod/nfsiod.8 @@ -69,9 +69,7 @@ detects that the running kernel does not include support, it will attempt to load a loadable kernel module containing .Tn NFS code, using -.Xr kldload 8 -by way of -.Xr vfsload 3 . +.Xr kldload 2 . If this fails, or no .Tn NFS KLD was available, @@ -81,8 +79,8 @@ exits with an error. .Ex -std .Sh SEE ALSO .Xr nfsstat 1 , +.Xr kldload 2 , .Xr nfssvc 2 , -.Xr kldload 8 , .Xr mountd 8 , .Xr nfsd 8 , .Xr rpcbind 8 diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c index 547e238f3519..15e5f762e52a 100644 --- a/sbin/nfsiod/nfsiod.c +++ b/sbin/nfsiod/nfsiod.c @@ -51,6 +51,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -73,16 +74,15 @@ int main(int argc, char *argv[]) { int ch; - struct vfsconf vfc; + struct xvfsconf vfc; int error; unsigned int iodmin, iodmax, num_servers; size_t len; error = getvfsbyname("nfs", &vfc); - if (error && vfsisloadable("nfs")) { - if (vfsload("nfs")) - err(1, "vfsload(nfs)"); - endvfsent(); /* flush cache */ + if (error) { + if (kldload("nfs")) + err(1, "kldload(nfs)"); error = getvfsbyname("nfs", &vfc); } if (error) -- cgit v1.2.3