[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH 1/2] getty: keep IUTF8
From: Timo Teräs <timo.teras () iki ! fi>
Date: 2022-05-04 16:52:48
Message-ID: 20220504165250.28079-1-timo.teras () iki ! fi
[Download RAW message or body]
IUTF8 is needed to handle line editing correctly in utf-8 mode.
On virtual terminals kernel sets this flag automatically if utf8
mode is active (the default).
This is also what util-linux agetty does.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
---
loginutils/getty.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/loginutils/getty.c b/loginutils/getty.c
index cd6378d80..890826a57 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -49,6 +49,9 @@
#ifndef IUCLC
# define IUCLC 0
#endif
+#ifndef IUTF8
+# define IUTF8 0
+#endif
#ifndef LOGIN_PROCESS
# undef ENABLE_FEATURE_UTMP
@@ -310,7 +313,7 @@ static void init_tty_attrs(int speed)
if (option_mask32 & F_RTSCTS)
G.tty_attrs.c_cflag |= CRTSCTS; /* flow control using RTS/CTS pins */
#endif
- G.tty_attrs.c_iflag = 0;
+ G.tty_attrs.c_iflag &= IUTF8;
G.tty_attrs.c_lflag = 0;
/* non-raw output; add CR to each NL */
G.tty_attrs.c_oflag = OPOST | ONLCR;
--
2.36.0
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic