summaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
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