mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Automatically load the vn module if it isn't already in the kernel.
This commit is contained in:
parent
8573fbf238
commit
c2a1ba0f78
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43216
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue