summaryrefslogtreecommitdiffstats
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
parent62af9afecd9288c4041583095c7b6cce701a5384 (diff)
downloadFreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.zip
FreeBSD-src-a4f4635e03e0fdc84d465c0517f302f55961b645.tar.gz
Merge from Lite2 (use new getvfsbyname() interface)
-rw-r--r--sbin/nfsd/Makefile1
-rw-r--r--sbin/nfsd/nfsd.84
-rw-r--r--sbin/nfsd/nfsd.c18
-rw-r--r--sbin/nfsiod/Makefile1
-rw-r--r--sbin/nfsiod/nfsiod.c17
-rw-r--r--usr.sbin/nfsd/Makefile1
-rw-r--r--usr.sbin/nfsd/nfsd.84
-rw-r--r--usr.sbin/nfsd/nfsd.c18
8 files changed, 33 insertions, 31 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
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
diff --git a/usr.sbin/nfsd/Makefile b/usr.sbin/nfsd/Makefile
index 12ce92e..6a144fa 100644
--- a/usr.sbin/nfsd/Makefile
+++ b/usr.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/usr.sbin/nfsd/nfsd.8 b/usr.sbin/nfsd/nfsd.8
index 4965876..8e13e72 100644
--- a/usr.sbin/nfsd/nfsd.8
+++ b/usr.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/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index 6985445..1d4fdf0 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.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