Add hooks into the mount_mfs code in newfs to do the FreeBSD-style

LKM loading if it was not configured into the system.

Note that the LKM for MFS is not enabled by default, but I got it working on
my machine..  I'll see what I did..
This commit is contained in:
Peter Wemm 1996-01-01 08:37:28 +00:00
parent b63e1fe2c4
commit 10dcae5806
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13140

View File

@ -217,6 +217,9 @@ main(argc, argv)
struct statfs *mp;
int fsi, fso, len, n;
char *cp, *s1, *s2, *special, *opstring, buf[BUFSIZ];
#ifdef MFS
struct vfsconf *vfc;
#endif
if (progname = rindex(*argv, '/'))
++progname;
@ -549,7 +552,18 @@ main(argc, argv)
args.export.ex_flags = 0;
args.base = membase;
args.size = fssize * sectorsize;
if (mount(MOUNT_MFS, argv[1], mntflags, &args) < 0)
vfc = getvfsbyname("mfs");
if(!vfc && vfsisloadable("mfs")) {
if(vfsload("mfs")) {
err(1, "vfsload(mfs)");
}
endvfsent(); /* flush cache */
vfc = getvfsbyname("mfs");
}
if (mount(vfc ? vfc->vfc_index : MOUNT_MFS, argv[1], mntflags,
&args) < 0)
fatal("%s: %s", argv[1], strerror(errno));
if(filename) {
munmap(membase,fssize * sectorsize);