From a4f4635e03e0fdc84d465c0517f302f55961b645 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 11 Mar 1997 12:51:00 +0000 Subject: Merge from Lite2 (use new getvfsbyname() interface) --- sbin/nfsiod/Makefile | 1 + sbin/nfsiod/nfsiod.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sbin/nfsiod') 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 @@ -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 -- cgit v1.1