summaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-08-10 20:19:04 +0000
committermux <mux@FreeBSD.org>2002-08-10 20:19:04 +0000
commitf43070c32510080cd90cfad7384d00f798c8d852 (patch)
treef2655b26537a3fa42106a5f0b342f24c8d6e679d /sbin/nfsiod
parent120b32fbcc3d50570076359500df08aac80318b6 (diff)
downloadFreeBSD-src-f43070c32510080cd90cfad7384d00f798c8d852.zip
FreeBSD-src-f43070c32510080cd90cfad7384d00f798c8d852.tar.gz
- 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.
Diffstat (limited to 'sbin/nfsiod')
-rw-r--r--sbin/nfsiod/Makefile1
-rw-r--r--sbin/nfsiod/nfsiod.86
-rw-r--r--sbin/nfsiod/nfsiod.c10
3 files changed, 8 insertions, 9 deletions
diff --git a/sbin/nfsiod/Makefile b/sbin/nfsiod/Makefile
index 47cd290..22717c5 100644
--- a/sbin/nfsiod/Makefile
+++ b/sbin/nfsiod/Makefile
@@ -2,6 +2,7 @@
# $FreeBSD$
PROG= nfsiod
+WARNS?= 6
MAN= nfsiod.8
.include <bsd.prog.mk>
diff --git a/sbin/nfsiod/nfsiod.8 b/sbin/nfsiod/nfsiod.8
index 281c675..9131f41 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 547e238..15e5f76 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -51,6 +51,7 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/syslog.h>
#include <sys/wait.h>
+#include <sys/linker.h>
#include <sys/mount.h>
#include <sys/time.h>
#include <sys/sysctl.h>
@@ -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)
OpenPOWER on IntegriCloud