summaryrefslogtreecommitdiffstats
path: root/sbin/mountd/mountd.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
committerwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
commiteeef7952c3836dd1eb5e994695d5c745b6b51784 (patch)
treeeae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/mountd/mountd.c
parentd4b42cfe457790ba8db25f68e68f7c056ddc69b5 (diff)
downloadFreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.zip
FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.tar.gz
Automatically load NFS and a bevy of other filesystems.
Diffstat (limited to 'sbin/mountd/mountd.c')
-rw-r--r--sbin/mountd/mountd.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index e674150..605e31f 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -38,11 +38,13 @@
static char copyright[] =
"@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n";
-#endif not lint
+#endif /*not lint*/
#ifndef lint
-static char sccsid[] = "@(#)mountd.c 8.8 (Berkeley) 2/20/94";
-#endif not lint
+/*static char sccsid[] = "From: @(#)mountd.c 8.8 (Berkeley) 2/20/94";*/
+static const char rcsid[] =
+ "$Id$";
+#endif /*not lint*/
#include <sys/param.h>
#include <sys/file.h>
@@ -235,6 +237,18 @@ main(argc, argv)
{
SVCXPRT *transp;
int c;
+ struct vfsconf *vfc;
+
+ vfc = getvfsbyname("nfs");
+ if(!vfc && vfsisloadable("nfs")) {
+ if(vfsload("nfs"))
+ err(1, "vfsload(nfs)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("nfs");
+ }
+ if(!vfc) {
+ errx(1, "NFS support is not available in the running kernel");
+ }
while ((c = getopt(argc, argv, "n")) != EOF)
switch (c) {
OpenPOWER on IntegriCloud