diff options
author | peter <peter@FreeBSD.org> | 1999-01-26 04:53:09 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-01-26 04:53:09 +0000 |
commit | d5e1466ec05ce186960252c0dac6c80501337c3a (patch) | |
tree | 694751563475d48a33f76ae9f552934637047913 /usr.sbin/vnconfig | |
parent | 894f767f8025399cb24aae12ef2844503148988b (diff) | |
download | FreeBSD-src-d5e1466ec05ce186960252c0dac6c80501337c3a.zip FreeBSD-src-d5e1466ec05ce186960252c0dac6c80501337c3a.tar.gz |
Automatically load the vn module if it isn't already in the kernel.
Diffstat (limited to 'usr.sbin/vnconfig')
-rw-r--r-- | usr.sbin/vnconfig/vnconfig.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/vnconfig/vnconfig.c b/usr.sbin/vnconfig/vnconfig.c index de84988..ad19fc9e 100644 --- a/usr.sbin/vnconfig/vnconfig.c +++ b/usr.sbin/vnconfig/vnconfig.c @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)vnconfig.c 8.1 (Berkeley) 12/15/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: vnconfig.c,v 1.7 1997/10/27 07:55:31 charnier Exp $"; #endif /* not lint */ #include <err.h> @@ -55,6 +55,7 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/ioctl.h> #include <sys/mount.h> +#include <sys/module.h> #include <sys/stat.h> #include <sys/vnioctl.h> #include <ufs/ufs/ufsmount.h> @@ -169,6 +170,10 @@ main(argc, argv) usage(); } + if (modfind("vn") < 0) + if (kldload("vn") < 0 || modfind("vn") < 0) + err(1, "cannot find or load \"vn\" kernel module"); + if (flags == 0) flags = VN_CONFIG; if (all) |