summaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-03-11 12:51:00 +0000
committerpeter <peter@FreeBSD.org>1997-03-11 12:51:00 +0000
commita4f4635e03e0fdc84d465c0517f302f55961b645 (patch)
tree27847f689f36348ef4021f3272cb4683e23bff5c /sbin/nfsiod
parent62af9afecd9288c4041583095c7b6cce701a5384 (diff)
downloadFreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.zip
FreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.tar.gz
Merge from Lite2 (use new getvfsbyname() interface)
Diffstat (limited to 'sbin/nfsiod')
-rw-r--r--sbin/nfsiod/Makefile1
-rw-r--r--sbin/nfsiod/nfsiod.c17
2 files changed, 9 insertions, 9 deletions
diff --git a/sbin/nfsiod/Makefile b/sbin/nfsiod/Makefile
index 08d6157..9928806 100644
--- a/sbin/nfsiod/Makefile
+++ b/sbin/nfsiod/Makefile
@@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= nfsiod
+CFLAGS+= -D_NEW_VFSCONF
CFLAGS+=-DNFS
MAN8= nfsiod.8
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c
index 3100671..82443711 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -41,7 +41,7 @@ static char copyright[] =
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)nfsiod.c 8.3 (Berkeley) 2/22/94";
+static char sccsid[] = "@(#)nfsiod.c 8.4 (Berkeley) 5/3/95";
#endif not lint
#include <sys/param.h>
@@ -86,19 +86,18 @@ main(argc, argv)
char *argv[];
{
int ch, num_servers;
- struct vfsconf *vfc;
+ struct vfsconf vfc;
+ int error;
- vfc = getvfsbyname("nfs");
- if(!vfc && vfsisloadable("nfs")) {
- if(vfsload("nfs"))
+ error = getvfsbyname("nfs", &vfc);
+ if (error && vfsisloadable("nfs")) {
+ if (vfsload("nfs"))
err(1, "vfsload(nfs)");
endvfsent(); /* flush cache */
- vfc = getvfsbyname("nfs");
+ error = getvfsbyname("nfs", &vfc);
}
-
- if(!vfc) {
+ if(error)
errx(1, "NFS support is not available in the running kernel");
- }
#define MAXNFSDCNT 20
#define DEFNFSDCNT 1
OpenPOWER on IntegriCloud