aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod/nfsiod.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-03-11 12:51:00 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-03-11 12:51:00 +0000
commit08966bd5fd3099449eb5e58de9f49e7b3887e48f (patch)
treedd60cb55da48c7065efdd75239390b7fb7c3b727 /sbin/nfsiod/nfsiod.c
parent73421c42fbcf3ade104e87d20fa75a809432c57c (diff)
downloadsrc-08966bd5fd3099449eb5e58de9f49e7b3887e48f.tar.gz
src-08966bd5fd3099449eb5e58de9f49e7b3887e48f.zip
Merge from Lite2 (use new getvfsbyname() interface)
Notes
Notes: svn path=/head/; revision=23684
Diffstat (limited to 'sbin/nfsiod/nfsiod.c')
-rw-r--r--sbin/nfsiod/nfsiod.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c
index 3100671a06cc..82443711dbfd 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