getopt returns -1 not EOF, minor cleanup

This commit is contained in:
lukem 1997-10-17 12:01:19 +00:00
parent c80b353465
commit 1dc35d9949
2 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: portmap.8,v 1.3 1997/10/17 05:37:35 mrg Exp $
.\" $NetBSD: portmap.8,v 1.4 1997/10/17 12:01:19 lukem Exp $
.\"
.\" Copyright (c) 1987 Sun Microsystems
.\" Copyright (c) 1990, 1991, 1993
@ -45,10 +45,10 @@ port to
.Tn RPC
program number mapper
.Sh SYNOPSIS
.Nm portmap
.Nm
.Op Fl d
.Sh DESCRIPTION
.Nm Portmap
.Nm
is a server that converts
.Tn RPC
program numbers into
@ -61,7 +61,7 @@ calls.
When an
.Tn RPC
server is started, it will tell
.Nm portmap
.Nm
what port number it is listening to, and what
.Tn RPC
program numbers it is prepared to serve.
@ -69,22 +69,22 @@ When a client wishes to make an
.Tn RPC
call to a given program number,
it will first contact
.Nm portmap
.Nm
on the server machine to determine
the port number where
.Tn RPC
packets should be sent.
.Pp
.Nm Portmap
.Nm
must be started before any
.Tn RPC
servers are invoked.
.Pp
Normally
.Nm portmap
.Nm
forks and dissociates itself from the terminal
like any other daemon.
.Nm Portmap
.Nm
then logs errors using
.Xr syslog 3 .
.Pp
@ -92,7 +92,7 @@ Option available:
.Bl -tag -width Ds
.It Fl d
(debug) prevents
.Nm portmap
.Nm
from running as a daemon,
and causes errors and debugging information
to be printed to the standard error output.
@ -103,7 +103,7 @@ to be printed to the standard error output.
.Xr inetd 8
.Sh BUGS
If
.Nm portmap
.Nm
crashes, all servers must be restarted.
.Sh HISTORY
The

View File

@ -1,4 +1,4 @@
/* $NetBSD: portmap.c,v 1.10 1997/10/17 05:37:37 mrg Exp $ */
/* $NetBSD: portmap.c,v 1.11 1997/10/17 12:01:25 lukem Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)portmap.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: portmap.c,v 1.10 1997/10/17 05:37:37 mrg Exp $");
__RCSID("$NetBSD: portmap.c,v 1.11 1997/10/17 12:01:25 lukem Exp $");
#endif
#endif /* not lint */
@ -142,7 +142,7 @@ main(argc, argv)
int len = sizeof(struct sockaddr_in);
struct pmaplist *pml;
while ((c = getopt(argc, argv, "d")) != EOF) {
while ((c = getopt(argc, argv, "d")) != -1) {
switch (c) {
case 'd':