From: Lennart Poettering Date: Fri, 19 Jul 2024 07:17:48 +0000 (+0200) Subject: terminal-util: modernize terminal_reset_ansi_seq() a bit X-Git-Tag: v257-rc1~873^2~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=524e1240ff1fea45be672bcbea5633f109764bb3;p=thirdparty%2Fsystemd.git terminal-util: modernize terminal_reset_ansi_seq() a bit Let's update the commentary a bit. Also, use a time-out of 100ms rather than 50ms for this, simply to unify on the same value used in vt_disallocate() in a similar case. --- diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index f171265164a..0c886afc05a 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -583,9 +583,9 @@ static int terminal_reset_ansi_seq(int fd) { "\033]104\007" /* reset colors */ "\033[?7h", /* enable line-wrapping */ SIZE_MAX, - 50 * USEC_PER_MSEC); + 100 * USEC_PER_MSEC); if (k < 0) - log_debug_errno(k, "Failed to write to terminal: %m"); + log_debug_errno(k, "Failed to reset terminal through ANSI sequences: %m"); if (r > 0) { r = fd_nonblock(fd, false);