From nobody Sat Dec 28 18:56:52 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 4YLBRm6bMWz5j373; Sat, 28 Dec 2024 18:56:52 +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 4YLBRm4Fgdz53C8; Sat, 28 Dec 2024 18:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735412212; 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=IrScMMc8avls4S7nKEPluW82LDzt7eEwmK4sRDphZ+s=; b=oSZfXUhRR2uUWg6L/Xt/bH8lPXsSS4Am0Bl7oMetfiniZw1gK9sB9RMWbCZDendjyV4vGe T6QM/nbryABksBzWhIqxyVFoapL4EXHZc9sDhLKmlsvo9qqrKdHE0Fmlckbn40OfzySSnY EPzibfY/IGjprbMezs1Nk0pij5lMKx5TW4ouIxKAZjrcv+tqVpeTmtUtQ9eWKKi66Ietwj Ze4L4B+T8B3xQk4f+3cAqADNrNI03QwxCfCW5C169HtuGu9t9aeHGC1vNHlRZaEseE+MXo zvZkF+RiinjwToc2ZC/JknLEmHq59v5eetKML4rz54ydL3IpWbW0XU89Uw5Lhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735412212; 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=IrScMMc8avls4S7nKEPluW82LDzt7eEwmK4sRDphZ+s=; b=JYIYQrT3uIa4jdaeMMD/fVvv6hkxm57eDwU3OUJ+ki9LEMUrCMkdPE09vQ7H+hremBbBF7 SbS9I/Cs3XPWKvV8XXeVaGRCO0MotLA+pBDPLjV+beWOKGt7fpYrHME3bcmdr3iKQH7+9p Z3xGq8+fDnVjhwJWdInNOuXv9qAWZwZ3f4gptKdVcwmrfTZhgo3MseT/MrJ83hgQf1HS89 oIWFyyZMJ51QMFngb6vmyEjYoE6w19QuugaSsNjwZWsCHh1TTy1H60lenOfxhLJ/RMNtC5 f/S57d2+l/VX7apvR27mJFpRp+M3y25bBGEltA19PPv1uKmRxynnYrqcXkRw2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735412212; a=rsa-sha256; cv=none; b=St35FNMmdJc7KQa8aaj7Y9niGANSAZ/95E4BEJxDWiXcOZARBPfRhMq8hHHhnVeDBndpMw 4XSAbgcl82fw7XcvMjTmSNrnHm7k+ADlWpn+wu4H/y2sAyt8GgDX4cYqc2lDkcmh4MaFWG Bjz7jjStncSDlyNTcWNfrG942As/4MUOEPpYqcnQ8epKYE3JbUt3NP1nklnGdw2rgsW9Vu jTiIHe/pVe4fkUTLyyP7N4Coh4QEvUv2YHR9cKEy9fiSxx/igEv8b5Q8mYeZJyvzhd7LqE Yi7sAFjWoLfSqoK0WYStUVFTEGF2tjL2M1Yiwc2k175lulvuRvE4WuK31tTMmg== 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 4YLBRm2fhtzcT1; Sat, 28 Dec 2024 18:56:52 +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 4BSIuqNO038914; Sat, 28 Dec 2024 18:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSIuqX4038911; Sat, 28 Dec 2024 18:56:52 GMT (envelope-from git) Date: Sat, 28 Dec 2024 18:56:52 GMT Message-Id: <202412281856.4BSIuqX4038911@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: 940984f4c1c6 - stable/14 - loader: Use printc instead of print to fit in 24,80 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/14 X-Git-Reftype: branch X-Git-Commit: 940984f4c1c62a9470312ce4e7401064a3e8c798 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=940984f4c1c62a9470312ce4e7401064a3e8c798 commit 940984f4c1c62a9470312ce4e7401064a3e8c798 Author: Warner Losh AuthorDate: 2024-09-24 16:52:18 +0000 Commit: Warner Losh CommitDate: 2024-12-28 18:14:27 +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 ed84360d93b0..5820d80532b5 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