aboutsummaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
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
parent306e6b83936d0560c96775d3dbf0767138825040 (diff)
downloadsrc-5965373e69ca208cedd8ede9716ef0d58e6c3434.tar.gz
src-5965373e69ca208cedd8ede9716ef0d58e6c3434.zip
- 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
Notes: svn path=/head/; revision=101651
Diffstat (limited to 'sbin')
-rw-r--r--sbin/nfsiod/Makefile1
-rw-r--r--sbin/nfsiod/nfsiod.86
-rw-r--r--sbin/nfsiod/nfsiod.c10
-rw-r--r--sbin/umount/umount.c2
4 files changed, 9 insertions, 10 deletions
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 <bsd.prog.mk>
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 <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)
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c
index cd1a6c671e76..0406d28ba08a 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -200,7 +200,7 @@ main(int argc, char *argv[])
int
umountall(char **typelist)
{
- struct vfsconf vfc;
+ struct xvfsconf vfc;
struct fstab *fs;
int rval;
char *cp;