bin/156653: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Wed Jul 13 04:40:07 UTC 2011
The following reply was made to PR bin/156653; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: bin/156653: commit references a PR
Date: Wed, 13 Jul 2011 04:31:06 +0000 (UTC)
Author: ae
Date: Wed Jul 13 04:30:16 2011
New Revision: 223973
URL: http://svn.freebsd.org/changeset/base/223973
Log:
MFC r223661:
Improve error reporting. Use corresponding error message when file to be
preprocessed is missing. Also suggest to use absolute pathname if -p
option is specified.
PR: bin/156653
Modified:
stable/7/sbin/ipfw/main.c
Directory Properties:
stable/7/sbin/ipfw/ (props changed)
Modified: stable/7/sbin/ipfw/main.c
==============================================================================
--- stable/7/sbin/ipfw/main.c Wed Jul 13 04:27:47 2011 (r223972)
+++ stable/7/sbin/ipfw/main.c Wed Jul 13 04:30:16 2011 (r223973)
@@ -204,7 +204,7 @@ ipfw_main(int oldac, char **oldav)
save_av = av;
optind = optreset = 1; /* restart getopt() */
- while ((ch = getopt(ac, av, "abcdefhinNqs:STtv")) != -1)
+ while ((ch = getopt(ac, av, "abcdefhinNp:qs:STtv")) != -1)
switch (ch) {
case 'a':
do_acct = 1;
@@ -248,6 +248,10 @@ ipfw_main(int oldac, char **oldav)
co.do_resolv = 1;
break;
+ case 'p':
+ errx(EX_USAGE, "An absolute pathname must be used "
+ "with -p option.");
+
case 'q':
co.do_quiet = 1;
break;
@@ -527,9 +531,12 @@ main(int ac, char *av[])
* as a file to be preprocessed.
*/
- if (ac > 1 && av[ac - 1][0] == '/' && access(av[ac - 1], R_OK) == 0)
- ipfw_readfile(ac, av);
- else {
+ if (ac > 1 && av[ac - 1][0] == '/') {
+ if (access(av[ac - 1], R_OK) == 0)
+ ipfw_readfile(ac, av);
+ else
+ err(EX_USAGE, "pathname: %s", av[ac - 1]);
+ } else {
if (ipfw_main(ac, av)) {
errx(EX_USAGE,
"usage: ipfw [options]\n"
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-ipfw
mailing list