agetty: only enable F_UTF8 if kernel has already set IUTF8.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
Samuel Thibault 2011-08-04 01:11:02 +02:00 committed by Karel Zak
parent e3c5ef39e3
commit 7478fce029
1 changed files with 2 additions and 1 deletions

View File

@ -979,7 +979,8 @@ static void termio_init(struct options *op, struct termios *tp)
#ifdef IUTF8
tp->c_iflag = tp->c_iflag & IUTF8;
op->flags |= F_UTF8;
if (tp->c_iflag & IUTF8)
op->flags |= F_UTF8;
#else
tp->c_iflag = 0;
#endif