path: root/sbin/nfsiod/nfsiod.c
diff options
authorMaxime Henrion <mux@FreeBSD.org>2002-08-10 20:19:04 +0000
committerMaxime Henrion <mux@FreeBSD.org>2002-08-10 20:19:04 +0000
commit5965373e69ca208cedd8ede9716ef0d58e6c3434 (patch)
treef2655b26537a3fa42106a5f0b342f24c8d6e679d /sbin/nfsiod/nfsiod.c
parent306e6b83936d0560c96775d3dbf0767138825040 (diff)
- 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.
Notes: svn path=/head/; revision=101651
Diffstat (limited to 'sbin/nfsiod/nfsiod.c')
1 files changed, 5 insertions, 5 deletions
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 <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)