core: Limit terminal reset using ANSI sequences to /dev/console
Doing this in reset_terminal_fd() is a bit too invasive, see https://github.com/systemd/systemd/pull/32406#issuecomment-2070923583. Let's only do this for /dev/console so that we work around weird firmwares disabling line-wrapping, but avoid messing too much with other things. While we're at it, let's handle more than just line wrapping, and do a more general reset of stuff to get the terminal into a sane state.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
1b47cfab7f
commit
00bc83a275
@@ -98,6 +98,7 @@ bool isatty_safe(int fd);
|
||||
int reset_terminal_fd(int fd, bool switch_to_text);
|
||||
int reset_terminal(const char *name);
|
||||
int set_terminal_cursor_position(int fd, unsigned int row, unsigned int column);
|
||||
int terminal_reset_ansi_seq(int fd);
|
||||
|
||||
int open_terminal(const char *name, int mode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user