projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e221680
)
terminal-util: modernize terminal_reset_ansi_seq() a bit
author
Lennart Poettering
<lennart@poettering.net>
Fri, 19 Jul 2024 07:17:48 +0000
(09:17 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 19 Jul 2024 09:41:43 +0000
(11:41 +0200)
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.
src/basic/terminal-util.c
patch
|
blob
|
history
diff --git
a/src/basic/terminal-util.c
b/src/basic/terminal-util.c
index f171265164aee191e62a0b74c4ecc2bb974a9886..0c886afc05ab1cea504eded92d57d9fb947423bb 100644
(file)
--- 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,
-
5
0 * USEC_PER_MSEC);
+
10
0 * 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);