Re: bin/156653: ipfw(8) reports missing file as parameter problem
Synopsis: ipfw(8) reports missing file as parameter problem State-Changed-From-To: open->feedback State-Changed-By: ae State-Changed-When: Tue Jun 28 07:32:47 UTC 2011 State-Changed-Why: Can you provide exact commands to reproduce this? http://www.freebsd.org/cgi/query-pr.cgi?pr=156653 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"
Re: bin/156653: ipfw(8) reports missing file as parameter problem
I guess it would have been clearer if I'd said /path/to/a/non/existent/file in the ticket. Although I was missing the file in the current directory so wasn't using a path. Probably worth testing how it behaves if you give it an invalid directory as well as a missing file. -Jed On Jun 28, 2011, at 7:33 AM, a...@freebsd.org wrote: > Synopsis: ipfw(8) reports missing file as parameter problem > > State-Changed-From-To: open->feedback > State-Changed-By: ae > State-Changed-When: Tue Jun 28 07:32:47 UTC 2011 > State-Changed-Why: > Can you provide exact commands to reproduce this? > > http://www.freebsd.org/cgi/query-pr.cgi?pr=156653 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"
Re: bin/156653: ipfw(8) reports missing file as parameter problem
The following reply was made to PR bin/156653; it has been noted by GNATS. From: Jed Clear To: bug-follo...@freebsd.org Cc: Subject: Re: bin/156653: ipfw(8) reports missing file as parameter problem Date: Tue, 28 Jun 2011 21:58:29 -0400 "ipfw -n -p cpp /path/to/missing_file" still works in 8.1 to generate = the misleading error message. (Assuming one doesn't have the file = /path/to/missing_file on ones system.) The issue not that a missing = file caused an error, but why that is reported as "illegal option -- p" = instead of something like "no such file or directory". -Jed clear@net5501:~> ipfw -n -p cpp /path/to/missing_file ipfw: illegal option -- p ipfw: usage: ipfw [options] do "ipfw -h" or "man ipfw" for details clear@net5501:~> uname -a FreeBSD net5501 8.1-RELEASE-p4 FreeBSD 8.1-RELEASE-p4 #0: Sat May 28 = 15:02:21 EDT 2011 = r...@fbsdam3.my.domain:/usr/obj/nanobsd.custom/i386/usr/src/sys/JEDWALL = i386 clear@net5501:~>=20 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"
Re: bin/156653: ipfw(8) reports missing file as parameter problem
Synopsis: ipfw(8) reports missing file as parameter problem State-Changed-From-To: feedback->patched State-Changed-By: ae State-Changed-When: Wed Jun 29 06:48:14 UTC 2011 State-Changed-Why: Patched in head/. Thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=156653 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"
Re: bin/156653: commit references a PR
The following reply was made to PR bin/156653; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: bin/156653: commit references a PR Date: Wed, 29 Jun 2011 06:45:58 + (UTC) Author: ae Date: Wed Jun 29 06:45:44 2011 New Revision: 223661 URL: http://svn.freebsd.org/changeset/base/223661 Log: 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 MFC after: 2 weeks Modified: head/sbin/ipfw/main.c Modified: head/sbin/ipfw/main.c == --- head/sbin/ipfw/main.c Wed Jun 29 05:41:14 2011(r223660) +++ head/sbin/ipfw/main.c Wed Jun 29 06:45:44 2011(r223661) @@ -262,7 +262,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; @@ -306,6 +306,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; @@ -603,9 +607,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-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"