From nobody Tue Sep 24 16:56:39 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 4XCmGv544wz5Y3vv; Tue, 24 Sep 2024 16:56:39 +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 4XCmGv4Dn8z4RT3; Tue, 24 Sep 2024 16:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727196999; 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=hJ0tK2HNNic+icqBWjjiBTqP4aGKZGyB/6L9FTSJhh4=; b=j1QPs6h3ylCXDTN85FHgaS5bB9HcFCmEqUo/VQy3DYtVlXAl/AmWYmtjk1i1HGXuUbmPHS 1zx+EuGCRu74hwnLCLlgVl7AMO4AszOO1kbMFYejhB25fYhF7lOuIE1ny6FS3AfChDhkKl I37e14gZU6RKRC9wmQ5ekrlSAmN5fe+9YF1OqvD+qLB47Z/5I8mv0JSQPdRF3mAQBG+wKZ K0zPc+/frJL5i1GwShsCaw9Bzl0F8JaKcl/flajnAR43QTJqlwAw2r3WZI1QJB3stvupD1 aSCA4ZiRC14lwkxai7TCzEE35TX1kMfsMhLNO3FsVBAsVwwqNg4WxGDdf0sBKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727196999; a=rsa-sha256; cv=none; b=PKRWY+IaXmW+F35HwxeOw2BaKJNzKC5xqHgS59NOMH3s0q/w87Xz4BtiH4MGAoL9hiNsHk VQBjVfGtgUSQzJJ1R0x4oTLowW3TnqD2wa7lyG0AGB1/fxPrSi3AWT4Xf8Hexz+mX60Frc UBv5fTvX0Bnha2juI7SfROaUZz8MZSR+GNl0K4xB6jHyoAfuP4u9IPlekOnTuZonKXHKer j+4Prj6Kbvuj6Rdd949eLUsNECweNBPY8pF+DlmOhcot52rv/v9SM7DhYsqZTt18yRB1cq exGYOT0SUZRNdH8M6mSmu+zWDQC+KJPUSowJ9Iupv781EunyBUTjuAOCstbUPA== 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=1727196999; 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=hJ0tK2HNNic+icqBWjjiBTqP4aGKZGyB/6L9FTSJhh4=; b=mDsoIhEYQjW7CDT71GTPGgrGY6QP1gvCW6/ZRdC81zrN+hP/pbOyIv5/4p8jDVQHOdXf7/ sV3zQucGvus9et3XN9qWKVM3Crm7O8ztAnmmlNu02HNJnqdP0NLhsQ+RbWN7S5Sf/U9wIA HYjDlmcSef0eTgRF0KC4umPJQFrdKnnW+2bvdMqxBfxst7eIyVM7Nx3/OgtVBOCaewMDpQ 3gvULYNPvX3lQIDGVs6gR72FFzxA0IDh7r87jRewszYmZK3mnhHsIDlXm+GdMC3T25zp6v RCyhrS4mr8eic4TMIFDRlOZGuG4Y0TQc2rX4XPTerhZGPWkkQ3pGO8eSMb67Kg== 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 4XCmGv3qc2zcLR; Tue, 24 Sep 2024 16:56:39 +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 48OGudBp058850; Tue, 24 Sep 2024 16:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OGudvI058847; Tue, 24 Sep 2024 16:56:39 GMT (envelope-from git) Date: Tue, 24 Sep 2024 16:56:39 GMT Message-Id: <202409241656.48OGudvI058847@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: 3fb656f8ef21 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 3fb656f8ef21332d96de8097521aaa51ddeb649d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3fb656f8ef21332d96de8097521aaa51ddeb649d commit 3fb656f8ef21332d96de8097521aaa51ddeb649d Author: Warner Losh AuthorDate: 2024-09-24 16:52:18 +0000 Commit: Warner Losh CommitDate: 2024-09-24 16:57:11 +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 --- 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