summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-04-01 14:15:30 +0000
committerbde <bde@FreeBSD.org>1997-04-01 14:15:30 +0000
commit68052e6de3b1e9b5ba9a171ddf0d7375d60b6f3f (patch)
tree11be4da9da9993ed86ada356477f0d9ac09eaac0 /sbin
parent0be4160258c9aae5b3023f3929ba8e9e571a8c4c (diff)
downloadFreeBSD-src-68052e6de3b1e9b5ba9a171ddf0d7375d60b6f3f.zip
FreeBSD-src-68052e6de3b1e9b5ba9a171ddf0d7375d60b6f3f.tar.gz
Don't fail when the vfs.nfs.nfs_privport sysctl doesn't exist
(presumably because the kernel is old). Moved the declaration of a variable realated to this sysctl outside of an unrelated ifdef. Not fixed: - this sysctl is badly named (nfs occurs twice). - it's silly to have for FreeBSD in FreeBSD code, especially when only half of the FreeBSD-dependent code is ifdefed.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mountd/mountd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index aef2583..472440e 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */
static const char rcsid[] =
- "$Id: mountd.c,v 1.15 1997/03/27 20:00:48 guido Exp $";
+ "$Id: mountd.c,v 1.16 1997/03/29 03:32:49 imp Exp $";
#endif /*not lint*/
#include <sys/param.h>
@@ -254,10 +254,10 @@ main(argc, argv)
{
SVCXPRT *udptransp, *tcptransp;
int c;
+ int mib[3];
#ifdef __FreeBSD__
struct vfsconf vfc;
int error;
- int mib[3];
error = getvfsbyname("nfs", &vfc);
if (error && vfsisloadable("nfs")) {
@@ -321,8 +321,8 @@ main(argc, argv)
mib[0] = CTL_VFS;
mib[1] = MOUNT_NFS;
mib[2] = NFS_NFSPRIVPORT;
- if (sysctl(mib, 3, NULL, NULL,
- &resvport_only, sizeof(resvport_only)) != 0) {
+ if (sysctl(mib, 3, NULL, NULL, &resvport_only,
+ sizeof(resvport_only)) != 0 && errno != ENOENT) {
syslog(LOG_ERR, "sysctl: %m");
exit(1);
}
OpenPOWER on IntegriCloud