Merge from Lite2 (use new getvfsbyname() interface)

This commit is contained in:
Peter Wemm 1997-03-11 12:51:00 +00:00
parent 73421c42fb
commit 08966bd5fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23684
8 changed files with 33 additions and 31 deletions

View file

@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= nfsd
CFLAGS+= -D_NEW_VFSCONF
CFLAGS+=-DNFS
MAN8= nfsd.8
DPADD+= ${LIBUTIL}

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= nfsiod
CFLAGS+= -D_NEW_VFSCONF
CFLAGS+=-DNFS
MAN8= nfsiod.8

View file

@ -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

View file

@ -1,6 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
PROG= nfsd
CFLAGS+= -D_NEW_VFSCONF
CFLAGS+=-DNFS
MAN8= nfsd.8
DPADD+= ${LIBUTIL}

View file

@ -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

View file

@ -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