From 6e0b43d4642048cb4c9976ee9d554af5368a9f04 Mon Sep 17 00:00:00 2001 From: charnier Date: Fri, 13 Jun 1997 06:27:12 +0000 Subject: Remove __progname. Cosmetic in usage string. --- sbin/ipfw/ipfw.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'sbin/ipfw') diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 7a426ec..223e2e8 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -16,7 +16,7 @@ * * NEW command line interface for IP firewall facility * - * $Id: ipfw.c,v 1.42 1997/03/29 03:32:28 imp Exp $ + * $Id: ipfw.c,v 1.43 1997/06/02 05:02:33 julian Exp $ * */ @@ -47,7 +47,6 @@ #include #include -extern char *__progname; int lineno = -1; int s; /* main RAW socket */ @@ -426,11 +425,8 @@ show_usage(const char *fmt, ...) vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); warnx("error: %s", buf); - } else - warnx("error"); - fprintf(stderr, -"Usage:\n" -" %s [options]\n" + } + fprintf(stderr, "usage: ipfw [options]\n" " flush\n" " add [number] rule\n" " delete number ...\n" @@ -452,10 +448,9 @@ show_usage(const char *fmt, ...) " {established|setup}\n" " tcpflags [!]{syn|fin|rst|ack|psh|urg},...\n" " ipoptions [!]{ssrr|lsrr|rr|ts},...\n" -" icmptypes {type[,type]}...\n", -__progname); +" icmptypes {type[,type]}...\n"); - errx(1, "see man %s(8) for proper usage.", __progname); + exit(1); } static int @@ -1077,7 +1072,7 @@ ipfw_main(ac,av) do_resolv=1; break; default: - show_usage("invalid flag ``-%c''", ch); + show_usage(NULL); } ac -= optind; -- cgit v1.1