]> git.ipfire.org Git - thirdparty/systemd.git/commit
terminal-util: during terminal reset clear from beginning of line to end of screen
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Mar 2025 15:07:02 +0000 (16:07 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 6 Mar 2025 22:32:32 +0000 (22:32 +0000)
commit4efd46c44bc599a71da1ff24149291ef10df61ff
tree39e4a68807588b15ff276badc8d6a9d52ed05be2
parent4d44670dc615e254703cff6a199df19e7f741b98
terminal-util: during terminal reset clear from beginning of line to end of screen

tianocore does some weird shit with its terminal emulation and regular
fills half the terminal with grey background and then invokes us with
this not cleared up. Hence let us clear this up for it: as part of the
ansi sequence based reset let's position the cursor explicitly at the
beginning of the current line, and erase everything till the end of the
screen. This makes boot output in tianocore vms much much cleaner.

Note that this does *not* erase any terminal output *before* the cursor
position where we take over, because that typically contains valuable
information still we should not erase.
src/basic/terminal-util.c