From nobody Wed Oct 21 20:48:39 2026 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 4j91bD2WfBz6wV42 for ; Wed, 21 Oct 2026 20:48:40 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j91bD0gnpz4rDP for ; Wed, 21 Oct 2026 20:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792615720; 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=6552u0E2GvwsaZ6/xbLU0f6ZmS3kqfHG3QRARjVNuqw=; b=XR9cSVhJU+V0hDFNl0CJ9gIFGCD1PWvlP+FpzLVzdxNYzX4WJnnG21RzOGyMyW0fOpjyl+ 6i22dn+EG3lZL0P6pbRHGwQcTGVQ3AoOpcfq15kx4b3B2UDJEugCIArbZxnnumpbhMYoQK ge1914cs836rLX4Eq87RRXq4VnOXDTr7sxSQiRi2nW0zXcMNMCu0bY8DrVpaw9YZv0rghm 6GakGyvvybMdBRgLLpmfPFfYz2zH/iFVKkm9XFlQYASX+WCu24w5ST2RKfMNVId9GP3kwT 7h9hGDLKkkbNUXva0JCxI59RwWpxZpS7NSzvJ7n9sQWy463FvvahgVDreQy33w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792615720; b=voTjGUXTSmSNGUNSSZFHfNedLOLv30nglEN1G9z7Scmo+478i13kpEfm6FZglSuliV2emW XPcVl7h6oxQxhvT+4Roon5/zVfPcQF/Kw+0kZyCZT69/x6S6F5h+cLEuln7NjizK3aMFgF nTX+U2qtfGsj3j7l25snWGxRHNEN2a02SrAwcyBKnW4paEOoCr7x/7U84e6fGVfoew0ahg 3tkaKDBvrWWsFFuICOoHa7tHlokzhefXgO4Umtv4gOkRioCh+5rfF10Y4w2nO7pc39Ki8q 6reYoZOfF/egkQC4Ml4XLT3rJvMmTQX6PTN0OiG3xvI2vLcK0p/fZbv91p/BRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792615720; 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=6552u0E2GvwsaZ6/xbLU0f6ZmS3kqfHG3QRARjVNuqw=; b=xEYa3il5AkaHEn+vPmR5+vvhZ+OgZUb3GQMmo1hoqNjPKnNMcHHxf+U5xsMpwYZ0UgwH3U 2Jhj3lxMtC7++xo+5o6UICwH+K6RLRM7rKUeSX6AKuGgEglBOKj9BwmBR4u4aDISd5KMdQ FMfucjK3Ko1BKKFqf6eLUl5yC85ulLSl00uBpEySl2EVTinBepTuAwotl7NXUjnqbIjHaV 34a4zTquN0k8GUC3ZovMbI4tWss/8REy+/xs4QUJ+gNGCckw7ICVSDJZ+jvEExmS/XKPBY 9Hg8Na2W2qpBWUuxaHbFSFgwUJrIqLWLuykw9WmmoxPNzzNZomhsNM4sBcU9bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j91bD019cz19Hd for ; Wed, 21 Oct 2026 20:48:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ecd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 21 Oct 2026 20:48:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: da04cf02c96b - main - mkimg: Ignore redundant %align values List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da04cf02c96b97c587580b336fa527392467f689 Auto-Submitted: auto-generated Date: Wed, 21 Oct 2026 20:48:39 +0000 Message-Id: <6ad92527.1ecd0.3c54c323@gitrepo.freebsd.org> The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=da04cf02c96b97c587580b336fa527392467f689 commit da04cf02c96b97c587580b336fa527392467f689 Author: Colin Percival AuthorDate: 2026-10-17 19:14:16 +0000 Commit: Colin Percival CommitDate: 2026-10-21 20:40:38 +0000 mkimg: Ignore redundant %align values Partitions are trivially aligned to sector boundaries, so asking e.g. for a partition to be aligned to a 64-byte boundary is pointless but harmless. Treat it as such, with a warning (in case the request was a mistake, e.g. requesting 1-byte instead of 1M-byte alignment) rather than as an error. Reviewed by: markj Suggested by: markj MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D60819 --- usr.bin/mkimg/mkimg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/usr.bin/mkimg/mkimg.c b/usr.bin/mkimg/mkimg.c index d8f872b72261..ce0bc98a9f3f 100644 --- a/usr.bin/mkimg/mkimg.c +++ b/usr.bin/mkimg/mkimg.c @@ -516,7 +516,15 @@ mkimg(void) if (expand_number(align, &bytealign) == -1) err(EX_DATAERR, "partition %d", part->index + 1); - if ((bytealign == 0) || (bytealign % secsz != 0)) + if (bytealign == 0) + errx(EX_DATAERR, "partition %d: " + "invalid alignment", part->index + 1); + if (secsz % bytealign == 0) { + warnx("partition %d: ignoring " + "redundant alignment", part->index + 1); + bytealign = secsz; + } + if (bytealign % secsz != 0) errx(EX_DATAERR, "partition %d: " "invalid alignment", part->index + 1); blkalign = bytealign / secsz;