From: Werner Fink Date: Tue, 2 Aug 2011 12:20:31 +0000 (+0200) Subject: agetty: Fix IUTF8 flag X-Git-Tag: v2.20-rc2~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8408647d89a11f132104fdf98cefa80ed8f0df51;p=thirdparty%2Futil-linux.git 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 --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 6120a26b6e..203668eadf 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);