From 5e9ed8caa7a5b03bf42d07867b3053f67625b4c8 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 1 Jan 1996 08:37:28 +0000 Subject: 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.. --- sbin/newfs/newfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 2375ffb..c9f2504 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -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); -- cgit v1.1