From 05cbe654125913961f0cf82f81af167167571928 Mon Sep 17 00:00:00 2001 From: Marco S Hyman Date: Tue, 17 Jul 2001 17:39:10 +0000 Subject: bitch about extra command line args; ok dhartmei@ and markus@ --- sbin/pfctl/pfctl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sbin/pfctl') 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) -- cgit v1.2.3