diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 2001-07-17 17:39:10 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 2001-07-17 17:39:10 +0000 |
commit | 05cbe654125913961f0cf82f81af167167571928 (patch) | |
tree | 57c7eb1279ab81734f70bfae2e5c28771b2dfa8e /sbin | |
parent | 968868ac8f088d0a6c0a1bf445f80b0f9c9b6ecc (diff) |
bitch about extra command line args; ok dhartmei@ and markus@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 7b16417fb30..47ebdefa852 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.28 2001/07/16 21:09:37 markus Exp $ */ +/* $OpenBSD: pfctl.c,v 1.29 2001/07/17 17:39:09 marc Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -422,6 +422,12 @@ main(int argc, char *argv[]) } } + if (argc != optind) { + warnx("unknown command line argument: %s ...", argv[optind]); + usage(); + /* NOTREACHED */ + } + if ((opts & PF_OPT_NOACTION) == 0) { dev = open("/dev/pf", O_RDWR); if (dev == -1) |