From owner-svn-src-all@freebsd.org Fri Aug 10 14:10:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 744E1106BE1F; Fri, 10 Aug 2018 14:10:23 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B0438C440; Fri, 10 Aug 2018 14:10:23 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 082FB120C; Fri, 10 Aug 2018 14:10:23 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7AEAMTo000391; Fri, 10 Aug 2018 14:10:22 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7AEAMl0000389; Fri, 10 Aug 2018 14:10:22 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201808101410.w7AEAMl0000389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 10 Aug 2018 14:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337574 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 337574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2018 14:10:23 -0000 Author: ae Date: Fri Aug 10 14:10:22 2018 New Revision: 337574 URL: https://svnweb.freebsd.org/changeset/base/337574 Log: 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 Modified: head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Fri Aug 10 13:38:23 2018 (r337573) +++ head/sbin/ipfw/ipfw.8 Fri Aug 10 14:10:22 2018 (r337574) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2018 +.Dd August 10, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -315,10 +315,15 @@ When listing and .Fl d is specified, also show expired dynamic rules. .It Fl f -Do not ask for confirmation for commands that can cause problems -if misused, i.e., +Run without prompting for confirmation for commands that can cause problems if misused, +i.e., .Cm flush . 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 When listing a table (see the .Sx LOOKUP TABLES Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Fri Aug 10 13:38:23 2018 (r337573) +++ head/sbin/ipfw/ipfw2.c Fri Aug 10 14:10:22 2018 (r337574) @@ -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); }