From nobody Fri Jun 28 00:40:30 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 4W9GnC1xRDz5Nmc0; Fri, 28 Jun 2024 00:40:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9GnC08Bjz41W7; Fri, 28 Jun 2024 00:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719535231; 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=9qfTLIq54zqP/YzqHGUUrfyoq+0aHso8vqT1zODR/Fs=; b=X4BGRaYsxwxxNzrqbMWkNs1ht0cagNDiWnlJNw58JQCqVcHkZIBWbzmCBUlomjdZ+g3mNk uxAMbUH6aQf4GHxLY5/L557N9NLifZZ+34OF8ovwDuEAu2diVYrvORAjKWlqvoOVn1QaVR SWcnAjot0pQd7fMLAXtCSclD5H9YaRLKxM5a2glmcQv0Kc1vnO9RoCzwb/T+cJgVZ6eed2 Kddq9bSr/snD19OqkygAehOKRpXJPz8V6leWIIFMCToEHAcjNlDQ62fHAuL4anpxeyCEmp pfF3oKLZwOiv+y+6vdQDJwFiZrpKd4fr9r/dNK+Yv5bCGhcvzvrFGRWzdkvKcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719535231; a=rsa-sha256; cv=none; b=WABzrDoSfQNCTnB08giH088HqMBE3kKxRFnqOCG9La6R5QO/SfZoH4qRn61GamxkAZ1W3C RKOtHsB658J0p0mYlEBSuvlqxk/mWHVMPRGXbLu1XmCYpArnO10BWbEt1Awr6T8vynh+7T tLukm/aBqG5/HrYuFVfi1s21fvOU4BGvcIpicF95Jq2gytwjzVqSmfMci1K9yNStxW9knl fkxymJQtDsmagUYy+n0kjpjrPMJzX9FfJX/V720koUHjPmoNs3c8ZAVNtLG/xt64W3grrT 1sKxF4iiq9yDucFI4AdAyAuIt0gjy3CCpfF9Crg/B25/Ch3li5PhhTRBq7shAw== 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=1719535231; 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=9qfTLIq54zqP/YzqHGUUrfyoq+0aHso8vqT1zODR/Fs=; b=B+Li+P3vNg9XFI4eK8q+qagwKxlY2M3c0dz7HcHCKvGp8riQmAeuOjnw8WBV0xgjL+kaUh nRV8ny+Vej7v0KKFx5uUEVoAH4BeTZqNtereK4yyMmcnOH1fWZ4XTK9xgGwbN3cdyliD68 xpqgwCJ70VWAmAZRDEOiLHTFF4WgmMColtkCp8sScRjFqF/r79fcyUyPalteaOCP5XOhgz G9BAuh3eFZc9MXFeRjJFiA6cj/FcTIFLwOpdIGANlx1wEhVl/5/ZDi3/RjTP5Br4yolVc1 saGR8COKuh0QeG+IL0T7U/Z8vWPmL56sI0WF2dzR8XF1Ogyb6cP2sbWopSI8zA== 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 4W9GnB6t4KzZjl; Fri, 28 Jun 2024 00:40:30 +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 45S0eU9v006268; Fri, 28 Jun 2024 00:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S0eUe2006264; Fri, 28 Jun 2024 00:40:30 GMT (envelope-from git) Date: Fri, 28 Jun 2024 00:40:30 GMT Message-Id: <202406280040.45S0eUe2006264@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ab08da5328b4 - main - loader: Increase buffer size to accommodate longer commands 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab08da5328b4175e399d8e59adc4dfad0eea24f1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab08da5328b4175e399d8e59adc4dfad0eea24f1 commit ab08da5328b4175e399d8e59adc4dfad0eea24f1 Author: Ahmad Khalifa AuthorDate: 2024-06-05 00:32:58 +0000 Commit: Warner Losh CommitDate: 2024-06-28 00:40:15 +0000 loader: Increase buffer size to accommodate longer commands The longest command we have is "efi-autoresizecons". That combined with the two spaces before and after the command gives us a total of 23 characters including the null-terminator. Also move the two trailing spaces to their own pager_output call so they don't get truncated if the command is too long and increase the minimum string length to 20 in order to fix alignment issues caused by the increased buffer size. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1277 --- stand/common/commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stand/common/commands.c b/stand/common/commands.c index e6e4fd005f72..95d12ad95973 100644 --- a/stand/common/commands.c +++ b/stand/common/commands.c @@ -229,7 +229,7 @@ command_commandlist(int argc __unused, char *argv[] __unused) { struct bootblk_command **cmdp; int res; - char name[20]; + char name[23]; res = 0; pager_open(); @@ -238,9 +238,10 @@ command_commandlist(int argc __unused, char *argv[] __unused) if (res) break; if ((*cmdp)->c_name != NULL && (*cmdp)->c_desc != NULL) { - snprintf(name, sizeof(name), " %-15s ", + snprintf(name, sizeof(name), " %-20s", (*cmdp)->c_name); pager_output(name); + pager_output(" "); pager_output((*cmdp)->c_desc); res = pager_output("\n"); }