From 8408647d89a11f132104fdf98cefa80ed8f0df51 Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Tue, 2 Aug 2011 14:20:31 +0200 Subject: agetty: Fix IUTF8 flag Preserve IUTF8 as set up by the kernel, which knows which consoles are in utf8 mode. Signed-off-by: Samuel Thibault Signed-off-by: Werner Fink --- term-utils/agetty.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'term-utils/agetty.c') diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 6120a26b6..203668ead 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -977,7 +977,13 @@ static void termio_init(struct options *op, struct termios *tp) /* Flush input and output queues, important for modems! */ tcflush(STDIN_FILENO, TCIOFLUSH); - tp->c_iflag = tp->c_lflag = tp->c_oflag = 0; +#ifdef IUTF8 + tp->c_iflag = tp->c_iflag & IUTF8; + op->flags |= F_UTF8; +#else + tp->c_iflag = 0; +#endif + tp->c_lflag = tp->c_oflag = 0; if ((op->flags & F_KEEPCFLAGS) == 0) tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL); -- cgit v1.2.3-55-g7522