From nobody Sat Dec 28 18:54:58 2024 X-Original-To: dev-commits-src-branches@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 4YLBPZ36h8z5j38B; Sat, 28 Dec 2024 18:54:58 +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 4YLBPZ294Pz506f; Sat, 28 Dec 2024 18:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735412098; 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=X8wE2x3N6xcp+SD8oWRa0m7ogS64czUYXH3QYzyPsj0=; b=JV2eTJN5CFM/7gAAMCbZlUxdE+IYrn81HHRN9HPOavVDF85nsdhJfGIDrSKnRHVQ2ZG6Gn cZGGxofW3Hqj6RDYjeYGllfHLfyhOhiFXHv7W7RHSgfdgzDKewGjGqCe+/nJKyVfspp/TO PO3eoLAhAL2tS33ea02vIMKlGXDuD1cFvWmA8PmrcQrq7s1N9WVvSZFTVYkSaN9HdiQUZN MbwuVyjMnh94BILQ6iGrq5fg9ApIA23TYZ209FflZI8Om2pwjgNBJsnL+k7h4eA30+t1xV UmF8szmHN/XYxCipY9CtGqyAP0izVl2XDSKoAOwApIzan//6vfjwKx66hbP6gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735412098; 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=X8wE2x3N6xcp+SD8oWRa0m7ogS64czUYXH3QYzyPsj0=; b=WXL+CiJTpgQ6g/OV05SO9ay9eGephvGe8O9yevOyLBL4FM/CrJGHgsIDhFXGruwgaAbpJR +j9QI1Cie/kCrt+/rFYiho93f1hn44AUSM/VT/0D6FadT1rOczkA+zFmiBALkrcPD/SYbD CpbmvW5hvLwsj9GcjpqYYg+v1/Tar6ih1wHJLfUS3iQDz6e583kUGyNWPaqjlkY6ligCxp IHrKIqPq7noPrboaieyEivqTXECuB3DaCXGUog4jyY7HKZJiFUQPwALB5BuT5rwXFed3AZ HL3Bwl/KGBhLkcvE96ko2PELE58WCeJLczzQm6FyI7BWu0vkCsBCl1DcvlTFwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735412098; a=rsa-sha256; cv=none; b=a5jFqpFNnEi7UHTwsYQycpYW2/a5sKmmz0bSmB5Sb08iqU/JOZ1XVY/3Tf5cZYJPGyOgkw FIvlyV1K2ljRbi3ZiaAha4iCaV86w2JzvA+4ANzgvREijTRY6awnJ5BGS7UHDE6EdV6DCX F6S9XUm6PNMJK66GlKgC8LyXUx/X8fGXRXHd4GPZ4yoejghPh7bZ4vC6nWwbkW4JocIAIS 2yypw2MG/Ak0WKwQH623gq4s7ACFEyySZ8RnlEuScJ1Dq1+mf5phmducQpGSi8517WYX3O I7lG44o8EM/yxUfvgsRW+Qo51FO7t5XQ16yCn6ZStnM24oQK0rFS/+H+WV6qdQ== 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 4YLBPZ1kDjzc10; Sat, 28 Dec 2024 18:54:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BSIsw45037524; Sat, 28 Dec 2024 18:54:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSIsw0H037520; Sat, 28 Dec 2024 18:54:58 GMT (envelope-from git) Date: Sat, 28 Dec 2024 18:54:58 GMT Message-Id: <202412281854.4BSIsw0H037520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: bf0b82f8292d - stable/13 - loader: Use printc instead of print to fit in 24,80 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: bf0b82f8292db384199495ab457f00bcfa3e8c2c Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf0b82f8292db384199495ab457f00bcfa3e8c2c commit bf0b82f8292db384199495ab457f00bcfa3e8c2c Author: Warner Losh AuthorDate: 2024-09-24 16:52:18 +0000 Commit: Warner Losh CommitDate: 2024-12-28 18:14:31 +0000 loader: Use printc instead of print to fit in 24,80 print automatically adds a newline, while printc does not. Use printc in preference to print for managing the autoboot message. This means we can use line 24 safely on a 24x80 terminal, restoring some functionality that was lost in 101afbc6ee2f0. Note: we still set the default curosor position to 25,1 in screen.lua, but real VT100s (and successors) will treat any row larger than the pnumber of rows in a cursor motion command to be the last physical row (this is so you can move to 9999,9999 and do a cursor location query to get the size of the screen). Keeping that as is looks better on a typical VGA console. Fixes: 101afbc6ee2f0 Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46771 (cherry picked from commit 3fb656f8ef21332d96de8097521aaa51ddeb649d) --- stand/lua/menu.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 894c0af69d35..1d4c203bef40 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -530,6 +530,7 @@ function menu.run() drawn_menu = nil screen.defcursor() + -- We explicitly want the newline print adds print("Exiting menu!") end @@ -544,7 +545,7 @@ function menu.autoboot(delay) if last == nil or last ~= time then last = time screen.setcursor(x, y) - print("Autoboot in " .. time .. + printc("Autoboot in " .. time .. " seconds. [Space] to pause ") screen.defcursor() end @@ -553,9 +554,12 @@ function menu.autoboot(delay) if ch == core.KEY_ENTER then break else - -- erase autoboot msg + -- Erase autoboot msg. While real VT100s + -- wouldn't scroll when receiving a char with + -- the cursor at (24, 79), bad emulators do. + -- Avoid the issue by stopping at 79. screen.setcursor(0, y) - print(string.rep(" ", 80)) + printc(string.rep(" ", 79)) screen.defcursor() return ch end