From nobody Sat Jan 20 00:51:56 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 4TGycF0YPrz57nMR; Sat, 20 Jan 2024 00:51:57 +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 4TGycF06ZGz4TnW; Sat, 20 Jan 2024 00:51:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705711917; 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=DZnGoOnEiiExzVKaBCZL9/iq1k8MWdSRyd0Uz3KbOvk=; b=NUYfMEyR534MPouuDXFBgPLh+YkV8a9cJiQVRqZ03RsARh7KCLAO8hxip2VTvWWhJG4+B6 mfBnDy+XgCVZqSFAgLqdenegZOidcmAvCGxADwRSeFS5WWDuugAwMVS6Sxe+6xnFU0zZtZ LXHTA1sAaHqgcr3v0+S9I825++67pQyi/jpPL9hWK9ZNJwf9X5Q3D5TeBVvQrdOSkFRRzC 3j65+qyVoip/PKBghbcFhaPMW5yTjLAOf4U0ENareVAoO8uJZOVRrnvI7GP2CYzsh07S7o AnVQOK8Z2cv69I9NAmZ46J+IKoyu7Rfqn0NfjdUW6xiUNpVykGbMP18/b+q4Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705711917; 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=DZnGoOnEiiExzVKaBCZL9/iq1k8MWdSRyd0Uz3KbOvk=; b=YbnYMoHuHWvSg3zbnA+0bZvDFlexCWaBDUtOQEUSUPh4IUSo3ffYLJNwyjsS8GfpXXRE/R yKSfr2uhGY7I1rptUlKfcPj5w6RbzH86LVPW1O9bWxmBKRxG9E7eyaKmaVZE/lV0JG82Nm 6T8rhElLrwWL5j/ZGOjvqG/WM/VS7aHAWSs6QeKI69y8rtw+k09l8uuLTciCJik22j7Jqj BMoKvZWFu8ePsvuS79P1njxMIHdDvphJCxl8f9zGexSEGgVwPeugks9pmTXdv3RuyPkdID n3+QJblIwmxSnCKoA8p46KH8k5S5g0wmnnmO9Tna0RcUQrGOY9DeYzA+FkzeoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705711917; a=rsa-sha256; cv=none; b=nGvOBPikEttm7Ht0nPDfSeYCb1XBH91U/i0EkIzsR6244zuTUyScfiyFEYe1N2TDM6O/NK v9fsJwfKr218yym9M2h3XNh7yoR7dcSLhUWTjO0j3Ujxe/daP3B/7sOqDKzJLzLhkqJOQf +LMHZXyyF5odT97cMDptB0TWh8i3DKbjrk2z6RV56KSm6A3yaq48czKJUGRapaATcYFIO+ hudLHndjCC7eZq8ZzdblR3/C4xNr1YHxMuCtJ0yjxalQtY3IJ1KsGwdt1iJQcIKUiEwZOq 27ScS/JElw0yMz9BCJgkX6kHA9+A8yKh9M2/FUt91zqbEzM7nhw1W/rRHEmV8g== 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 4TGycD6H8ZzDw6; Sat, 20 Jan 2024 00:51:56 +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 40K0pugf066718; Sat, 20 Jan 2024 00:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40K0pu6a066715; Sat, 20 Jan 2024 00:51:56 GMT (envelope-from git) Date: Sat, 20 Jan 2024 00:51:56 GMT Message-Id: <202401200051.40K0pu6a066715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e0deb85065ef - main - 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/main X-Git-Reftype: branch X-Git-Commit: e0deb85065efbcd2123d65f65eb54bd1dcf0588c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e0deb85065efbcd2123d65f65eb54bd1dcf0588c commit e0deb85065efbcd2123d65f65eb54bd1dcf0588c Author: Mark Johnston AuthorDate: 2024-01-19 19:06:16 +0000 Commit: Mark Johnston CommitDate: 2024-01-20 00:50:56 +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 --- 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 fde375885a37..4601e6278046 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 14f43dcb3b24..dbd8f3a4d39e 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -164,7 +164,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 1951c13601df..fddc32b85322 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -894,11 +894,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);