Re: regarding that stack of newline chars expressed at boot
Date: Sun, 22 Sep 2024 19:46:29 UTC
Consider the following (cut and pasted, so you may need to tweak).
Warner
diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua
index ed84360d93b0..bab99b79c253 100644
--- a/stand/lua/menu.lua
+++ b/stand/lua/menu.lua
@@ -533,6 +533,14 @@ function menu.run()
print("Exiting menu!")
end
+local function print_str(str)
+ local i
+
+ for i = 1, str.len() do
+ printc(str[i])
+ end
+end
+
function menu.autoboot(delay)
local x = loader.getenv("loader_menu_timeout_x") or 4
local y = loader.getenv("loader_menu_timeout_y") or 24
@@ -544,7 +552,7 @@ function menu.autoboot(delay)
if last == nil or last ~= time then
last = time
screen.setcursor(x, y)
- print("Autoboot in " .. time ..
+ print_str("Autoboot in " .. time ..
" seconds. [Space] to pause ")
screen.defcursor()
end
On Sun, Sep 22, 2024 at 6:15 PM Dennis Clarke <dclarke@blastwave.org> wrote:
>
>
> This is from the "better late than never" file. So yes, any machine I
> had with a serial console was kicking out a newline char on every one
> of the "autoboot_delay" countdown. Seems to be a default of 10 secs
> and so therefore I was seeing ten lines of stuff.
>
> Seems to be related to :
>
>
>
> https://cgit.freebsd.org/src/commit/?id=101afbc6ee2f06f77e6886f1f3ffe115c579967c
>
> The trivial solution is to NOT use and old fashioned 80x24 DEC VT100
> type XTerm size for the session that connects to serial. The behavior
> vanishes at 80x25 now. I see that as the old DOS PC-Term size that some
> folks at Microsoft loved. Many years ago.
>
> Maybe it would be more elegant to just output the countdown secs number
> and then utter 010 BS chars and keep kicking out numbers that overwrite
> whatever was there before?
>
> Or do nothing.
>
> Hardly an issue really. Just seemed weird when I saw it.
>
> Thanks for letting me paint the bikeshed.
>
>
> --
> Dennis Clarke
> RISC-V/SPARC/PPC/ARM/CISC
> UNIX and Linux spoken
>
>