diff options
Diffstat (limited to 'libexec/ypxfr/ypxfr_main.c')
-rw-r--r-- | libexec/ypxfr/ypxfr_main.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c index 1c905cc..b40d5a0 100644 --- a/libexec/ypxfr/ypxfr_main.c +++ b/libexec/ypxfr/ypxfr_main.c @@ -28,15 +28,19 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id: ypxfr_main.c,v 1.9 1997/03/28 15:48:21 imp Exp $ */ + +#ifndef lint +static const char rcsid[] = + "$Id$"; +#endif /* not lint */ + +#include <errno.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> #include <string.h> #include <syslog.h> -#include <errno.h> +#include <unistd.h> #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> @@ -50,10 +54,6 @@ struct dom_binding {}; #include <rpcsvc/ypxfrd.h> #include "ypxfr_extern.h" -#ifndef lint -static const char rcsid[] = "$Id: ypxfr_main.c,v 1.9 1997/03/28 15:48:21 imp Exp $"; -#endif - char *progname = "ypxfr"; char *yp_dir = _PATH_YP; int _rpcpmstart = 0; @@ -112,10 +112,10 @@ static void usage() if (_rpcpmstart) { ypxfr_exit(YPXFR_BADARGS,NULL); } else { - fprintf(stderr,"usage: %s [-f] [-c] [-d target domain] \ -[-h source host] [-s source domain]\n", progname); - fprintf(stderr,"\t [-p path] [-C taskid program-number \ -ipaddr port] mapname\n"); + fprintf(stderr, "%s\n%s\n%s\n", + "usage: ypxfr [-f] [-c] [-d target domain] [-h source host]", + " [-s source domain] [-p path]", + " [-C taskid program-number ipaddr port] mapname"); exit(1); } } @@ -160,6 +160,7 @@ int ypxfr_foreach(status, key, keylen, val, vallen, data) return (0); } +int main(argc,argv) int argc; char *argv[]; @@ -185,7 +186,7 @@ main(argc,argv) debug = 1; if (!isatty(fileno(stderr))) { - openlog(progname, LOG_PID, LOG_DAEMON); + openlog("ypxfr", LOG_PID, LOG_DAEMON); _rpcpmstart = 1; } |