Re: regarding that stack of newline chars expressed at boot
- Reply: Dennis Clarke : "Re: regarding that stack of newline chars expressed at boot"
- Reply: Dennis Clarke : "Re: regarding that stack of newline chars expressed at boot"
- In reply to: Warner Losh : "Re: regarding that stack of newline chars expressed at boot"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Sep 2024 15:06:41 UTC
https://reviews.freebsd.org/D46771 might fix this setup. Dennis, can you test it? It seems to work for me, but it's good to have more eyes on it. Warner On Sun, Sep 22, 2024 at 1:46 PM Warner Losh <imp@bsdimp.com> wrote: > 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 >> >>