Restore the behaviour changed in r337536, when bad ipfw delete command

returns error.

Now -q option only makes it quiet. And when -f flag is specified, the
command will ignore errors and continue executing with next batched
command.

MFC after:	2 weeks
This commit is contained in:
Andrey V. Elsukov 2018-08-10 14:10:22 +00:00
parent 84c956df77
commit f4d5e7d8b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337574
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd July 9, 2018 .Dd August 10, 2018
.Dt IPFW 8 .Dt IPFW 8
.Os .Os
.Sh NAME .Sh NAME
@ -315,10 +315,15 @@ When listing and
.Fl d .Fl d
is specified, also show expired dynamic rules. is specified, also show expired dynamic rules.
.It Fl f .It Fl f
Do not ask for confirmation for commands that can cause problems Run without prompting for confirmation for commands that can cause problems if misused,
if misused, i.e., i.e.,
.Cm flush . .Cm flush .
If there is no tty associated with the process, this is implied. If there is no tty associated with the process, this is implied.
The
.Cm delete
command with this flag ignores possible errors,
i.e., nonexistent rule number.
And for batched commands execution continues with the next command.
.It Fl i .It Fl i
When listing a table (see the When listing a table (see the
.Sx LOOKUP TABLES .Sx LOOKUP TABLES

View File

@ -3314,7 +3314,7 @@ ipfw_delete(char *av[])
} }
} }
} }
if (exitval != EX_OK && co.do_quiet == 0) if (exitval != EX_OK && co.do_force == 0)
exit(exitval); exit(exitval);
} }