From nobody Sat Feb 03 19:11:38 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TS2Lf6HLwz58DMt; Sat, 3 Feb 2024 19:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TS2Lf5VBDz40CN; Sat, 3 Feb 2024 19:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706987498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uN1/owwh7ihFbB8oo4ffWovuXDh4SYZXwiT9aUFLiwc=; b=TtORXi9JrFlep/HZP8LD0RF8S7a4fUxVzsFGBlZn+taQBdHhiHoF1B6Jfxu6xb+KL8ltNv vBVyQqdW010vxCk4q0ePE2Uf/4u/E1x57JAZ2SptBnKcos43mviXJt5ooYDUq/11XYqPPu 78xrhkk1xhkSeMUtZXD7isg+NRqn2n5Pq1PazROZZ7+5tYgdAhvrK8xK55BSUaBbeCwlBJ nhTaM7I7/nH0V119pDOSUd6vBQ0tITfSYv0q9N8hgtEj3A7DE/uxlKBNF+97z+6tCavDel xW9NGGsfJyQcwUECB1Mp6UnbLK696yfFCFTKl4MdjiqupcTGApwGjrOFFv23Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706987498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uN1/owwh7ihFbB8oo4ffWovuXDh4SYZXwiT9aUFLiwc=; b=yM92C7/6F3DQcHqnICIjWJcuEYBGFPSVfoO4qMTYHC0sa7aDrK2XK2BHYyuNj05dwUqLLy m26BPNTHkMbU1S1Ixf2ntF1aKiYPtx6EgSH0m24BuUfUMN60Mr+NcHupliXZwTErrgxjBy TayEQnzT9o+DZLk6d5SV/qjEvyts2Iz2ePzXHsHSvowVat31SEutc266riKhWy2lyak8c8 eFKXrcDXgOuhImvh6G59kp5DMua7Ry/ohrMcfMfSr2oW69Ef+r8qfdPybbiJ2e7no5mE6H GUaLzhdr+IbkEOjNj0mjB66604YkfIv87ij1N7RfGn6v8Lj46jStJtBjB3BH0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706987498; a=rsa-sha256; cv=none; b=F9G1c9ecdf+oqjgnlorU095/EUGYQN8Bc8QBqZuUiCeLbdRx6skD1Q/YwBDLWHdP2sg8js e1GoxW8LvldDcPw5sl4tCUgYQFwUK8R7w4aJvIXnSLwu2ySnLr9YhjXdpkIqnfdl6F++2u JF8YSh2OzVDt+0KYZY8uQprEkG1R6HZHkynXm64ZRW7hq+bND7hNuUO5OccY272WYbDTfc pD8/K9vySW6P5pCGVv7xFrG4dOsYo/jpS1VS5XhyVxAWWlQkiGgKWLTeBk2kR1MmmCzG0P TBYJyY38mhW5FXc5PMWNd2ogWCIkhXHCu91x5qsFdzey1fq9fnnNJUCQq7YRHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TS2Lf4ZRPzQWn; Sat, 3 Feb 2024 19:11:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 413JBc07093807; Sat, 3 Feb 2024 19:11:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 413JBcx8093804; Sat, 3 Feb 2024 19:11:38 GMT (envelope-from git) Date: Sat, 3 Feb 2024 19:11:38 GMT Message-Id: <202402031911.413JBcx8093804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d139062ffb01 - stable/14 - makefs: Make it possible to silence warnings about duplicate paths List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d139062ffb01cdce1145d1a95c530da0e792d559 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d139062ffb01cdce1145d1a95c530da0e792d559 commit d139062ffb01cdce1145d1a95c530da0e792d559 Author: Mark Johnston AuthorDate: 2024-01-19 19:06:16 +0000 Commit: Mark Johnston CommitDate: 2024-02-03 19:10:43 +0000 makefs: Make it possible to silence warnings about duplicate paths When generating a VM image from an installworld mtree manifest, makefs spits out several thousand warnings about duplicate paths in the manifest. These are harmless and have been around for a long time (see the phabricator revision for some more details), so let's at least have a way to make makefs quieter. Reviewed by: brooks, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43513 (cherry picked from commit e0deb85065efbcd2123d65f65eb54bd1dcf0588c) --- usr.sbin/makefs/makefs.8 | 4 +++- usr.sbin/makefs/makefs.c | 2 +- usr.sbin/makefs/mtree.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index a5e15a045ec6..c6aeae961196 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -33,7 +33,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 2, 2024 +.Dd January 19, 2024 .Dt MAKEFS 8 .Os @@ -110,6 +110,8 @@ suffix may be provided to indicate that indicates a percentage of the calculated image size. .It Fl D Treat duplicate paths in an mtree manifest as warnings not error. +If this flag is specified more than once, warnings about duplicate paths +are not printed at all. .It Fl d Ar debug-mask Enable various levels of debugging, depending upon which bits are set in diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index 8c8e03b9d59f..e02571f42997 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -165,7 +165,7 @@ main(int argc, char *argv[]) break; case 'D': - dupsok = 1; + dupsok++; break; case 'd': diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 3e62afbc1137..dabc9f787f88 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -895,11 +895,11 @@ read_mtree_spec1(FILE *fp, bool def, const char *name) if (strcmp(name, node->name) == 0) { if (def == true) { - if (!dupsok) + if (dupsok == 0) mtree_error( "duplicate definition of %s", name); - else + else if (dupsok == 1) mtree_warning( "duplicate definition of %s", name);