From nobody Mon May 20 13:33:15 2024 X-Original-To: dev-commits-src-main@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 4Vjdmq6lHYz5LGf2; Mon, 20 May 2024 13:33:15 +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 4Vjdmq1wkXz4Nwc; Mon, 20 May 2024 13:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; 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=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=OaqcuQ4ml1uhZGWfMAPoSN9F6WMZ/t8dRQvErh1cSo/TL7zgBinFmr+ObYc8ndz28ndQLW UKIV5slwRZdl5yUjTUDG4Tv6VuTmH4iXdLRVaUMf8oAV5Qu5nvGQcWiQ/QWN5vah2kSoDb tBGfdJSSWYI2PGW4N1ICwyrOVKcdvK3XeI2Xn8yWB2zpVwQW31yrUxD/pAyTlZR21ICvAD JNA4l7co5a//jukqRaNaPwropk3fbVaEnXJJ4Ity4KlUveZWDCgeJplwlBRAnDFKUMAo2W pqJMXPE7OAJ1LlGpDCk8BLHoqusQOg6YaWmmbox3rljH52tb5sxVDTraZQ3TGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716211995; a=rsa-sha256; cv=none; b=gN45l+9eYkJVzsGdvGwoDKmpVNH9MmaMZDLubgF6egX2nxST3RcJxMUos7YDx2DknWuH0M Q1ZwIQGZyzHd6JQmW/nndyi5fSIBIq5ENHEP0YE6+Cxk5OwtPpjLVEQZeyVO/fWEy/Kgnc kdeG41JFW+YljPnxICVyshAAaKU4RdWpRWYaQwCccpTeUy/RDCCBJjh7ehSV5P6CJOdfT8 oi4KLKdHXWdZYEn0TzIEmASOnBnQWm6PLhW6k86LWieFgsHtnWKG/Mk2ZTtd5sxwdv55ll dD34wJ1i6rU8z0i9jPL+80PohWRghEv0gvhA4LkNc5avntqR+nvgu6QkedoP4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716211995; 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=2UFTRig/9hy7rCWfAC5k+xMj8pTrKkn4hMbAB9MCIoA=; b=lwshz1Iv/F9i5Z1WMP3HxWxwMADVO6DuAB6bsOkrySifql7gFJeJ5x42YhlJvnRnjpdXMD i97+Acrmg/fSPboBV9S3NQ4vop6cLW8gJ1LR3E4f/DFngRCkBglfaNMGYfydFM9CE1PU7V GkflbHRqOJuJzj5EbPvQDtcBdE2RB8kLwbyQTNRW9rgeLRn7iSSq+Je9JYIThd9AeG1FcR DpnivErOMZpXHlvoQj1Yn7wPp2v+OzSZStHRbpO7ySkwixSn35FgRiHd+WQSe9uyVSob8W vZoEutN7YT7Y3MPLJ2Y9hpjeozmz/hm5wDXDXMKRX5bIbvDS9DwLiJHCelqDXg== 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 4Vjdmq1Y32zglb; Mon, 20 May 2024 13:33:15 +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 44KDXFTf045859; Mon, 20 May 2024 13:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KDXFiO045856; Mon, 20 May 2024 13:33:15 GMT (envelope-from git) Date: Mon, 20 May 2024 13:33:15 GMT Message-Id: <202405201333.44KDXFiO045856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b780b6508b58 - main - diff: Warn if the atomizer detected truncation. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b780b6508b586f52126037fd748fe74dbeb12495 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b780b6508b586f52126037fd748fe74dbeb12495 commit b780b6508b586f52126037fd748fe74dbeb12495 Author: Dag-Erling Smørgrav AuthorDate: 2024-05-20 13:26:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-05-20 13:26:46 +0000 diff: Warn if the atomizer detected truncation. Sponsored by: Klara, Inc. Reviewed by: allanjude, markj Differential Revision: https://reviews.freebsd.org/D45219 --- usr.bin/diff/diffreg_new.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c index 3b50dfd5940b..a7a40ec12ec9 100644 --- a/usr.bin/diff/diffreg_new.c +++ b/usr.bin/diff/diffreg_new.c @@ -218,10 +218,14 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum) rc = D_ERROR; goto done; } + if (left.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file1); if (diff_atomize_file(&right, cfg, f2, (uint8_t *)str2, st2.st_size, diff_flags)) { rc = D_ERROR; goto done; } + if (right.atomizer_flags & DIFF_ATOMIZER_FILE_TRUNCATED) + warnx("%s truncated", file2); result = diff_main(cfg, &left, &right); if (result->rc != DIFF_RC_OK) {