diff options
author | ache <ache@FreeBSD.org> | 1994-10-19 05:10:06 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-10-19 05:10:06 +0000 |
commit | d8ab8a9dd1042210705220df1d4af99f512c67bb (patch) | |
tree | d221b7d852702662ab92bc722ef655df4179e0da /usr.bin/systat | |
parent | 9215905d653a6f8d66b929a9bfbbbd6eaba12865 (diff) | |
download | FreeBSD-src-d8ab8a9dd1042210705220df1d4af99f512c67bb.zip FreeBSD-src-d8ab8a9dd1042210705220df1d4af99f512c67bb.tar.gz |
Prevents segm. fault on unknown option
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index f9f7672..c11c553 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -88,6 +88,11 @@ main(argc, argv) p = lookup(&argv[0][1]); if (p == (struct cmdtab *)-1) { + fprintf(stderr, "%s: ambiguous request\n", + &argv[0][1]); + exit(1); + } + if (p == (struct cmdtab *)0) { fprintf(stderr, "%s: unknown request\n", &argv[0][1]); exit(1); |