Hardcode progname in usage string.

This commit is contained in:
Philippe Charnier 1997-10-20 12:41:41 +00:00
parent 5cf073070a
commit 03690a84cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30596
2 changed files with 10 additions and 11 deletions

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)slstat.8 6.8 (Berkeley) 6/20/91
.\" $Id$
.\" $Id: slstat.8,v 1.10 1997/02/22 16:13:33 peter Exp $
.\"
.Dd October 11, 1996
.Dt SLSTAT 8
@ -45,7 +45,7 @@
.Op Ar unit
.Sh DESCRIPTION
The
.Nm slstat
.Nm
utility
reports certain kernel statistics kept about serial line internet
protocol traffic.

View File

@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
"$Id$";
"$Id: slstat.c,v 1.11 1997/02/22 16:13:34 peter Exp $";
#endif
#include <sys/param.h>
@ -53,7 +53,7 @@ static const char rcsid[] =
#include <net/slcompress.h>
#include <net/if_slvar.h>
static void usage __P((const char *argv0));
static void usage __P((void));
static void intpr __P((void));
static void catchalarm __P((int));
@ -88,10 +88,10 @@ main(argc, argv)
case 'i':
interval = atoi(optarg);
if (interval <= 0)
usage(argv[0]);
usage();
break;
default:
usage(argv[0]);
usage();
}
}
if (optind >= argc)
@ -99,14 +99,14 @@ main(argc, argv)
else if (isdigit(argv[optind][0])) {
unit = atoi(argv[optind]);
if (unit < 0)
usage(argv[0]);
usage();
sprintf(interface, INTERFACE_PREFIX, unit);
} else if (strncmp(argv[optind], "sl", 2) == 0
&& isdigit(argv[optind][2])
&& sscanf(argv[optind], "sl%d", &unit) == 1) {
strncpy(interface, argv[optind], IFNAMSIZ);
} else
usage(argv[0]);
usage();
name[0] = CTL_NET;
name[1] = PF_LINK;
@ -145,10 +145,9 @@ main(argc, argv)
#define AMT (sizeof(*sc) - 2 * sizeof(sc->sc_comp.tstate))
static void
usage(argv0)
const char *argv0;
usage()
{
fprintf(stderr, "usage: %s [-i interval] [-vr] [unit]\n", argv0);
fprintf(stderr, "usage: slstat [-i interval] [-vr] [unit]\n");
exit(1);
}