summaryrefslogtreecommitdiffstats
path: root/sbin/nfsd
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/nfsd
parent62af9afecd9288c4041583095c7b6cce701a5384 (diff)
downloadFreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.zip
FreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.tar.gz
Merge from Lite2 (use new getvfsbyname() interface)
Diffstat (limited to 'sbin/nfsd')
-rw-r--r--sbin/nfsd/Makefile1
-rw-r--r--sbin/nfsd/nfsd.84
-rw-r--r--sbin/nfsd/nfsd.c18
3 files changed, 12 insertions, 11 deletions
diff --git a/sbin/nfsd/Makefile b/sbin/nfsd/Makefile
index 12ce92e..6a144fa 100644
--- a/sbin/nfsd/Makefile
+++ b/sbin/nfsd/Makefile
@@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= nfsd
+CFLAGS+= -D_NEW_VFSCONF
CFLAGS+=-DNFS
MAN8= nfsd.8
DPADD+= ${LIBUTIL}
diff --git a/sbin/nfsd/nfsd.8 b/sbin/nfsd/nfsd.8
index 4965876..8e13e72 100644
--- a/sbin/nfsd/nfsd.8
+++ b/sbin/nfsd/nfsd.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)nfsd.8 8.3 (Berkeley) 2/22/94
+.\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95
.\"
-.Dd February 22, 1994
+.Dd March 29, 1995
.Dt NFSD 8
.Os
.Sh NAME
diff --git a/sbin/nfsd/nfsd.c b/sbin/nfsd/nfsd.c
index 6985445..1d4fdf0 100644
--- a/sbin/nfsd/nfsd.c
+++ b/sbin/nfsd/nfsd.c
@@ -41,7 +41,7 @@ static char copyright[] =
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)nfsd.c 8.7 (Berkeley) 2/22/94";
+static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
#endif not lint
#include <sys/param.h>
@@ -67,7 +67,7 @@ static char sccsid[] = "@(#)nfsd.c 8.7 (Berkeley) 2/22/94";
#include <nfs/nfs.h>
#ifdef NFSKERB
-#include <des.h>
+#include <kerberosIV/des.h>
#include <kerberosIV/krb.h>
#endif
@@ -158,18 +158,18 @@ main(argc, argv, envp)
int tp4cnt, tp4flag, tp4sock, tpipcnt, tpipflag, tpipsock, udpflag;
char *cp, **cpp;
#ifdef __FreeBSD__
- 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"); /* probably unnecessary */
+ error = getvfsbyname("nfs", &vfc);
}
- if(!vfc) {
+ if (error)
errx(1, "NFS is not available in the running kernel");
- }
#endif
#ifdef OLD_SETPROCTITLE
OpenPOWER on IntegriCloud