summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorSamuel Thibault2011-08-04 01:11:02 +0200
committerKarel Zak2011-08-08 11:49:58 +0200
commit7478fce029ea438179a1437cf76784d67500e176 (patch)
tree30956e9ec3dfa5571e5af7d8ab793aee0374fe1f /term-utils/agetty.c
parentwall: build with SUID_{C,LD}FLAGS (diff)
downloadkernel-qcow2-util-linux-7478fce029ea438179a1437cf76784d67500e176.tar.gz
kernel-qcow2-util-linux-7478fce029ea438179a1437cf76784d67500e176.tar.xz
kernel-qcow2-util-linux-7478fce029ea438179a1437cf76784d67500e176.zip
agetty: only enable F_UTF8 if kernel has already set IUTF8.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 203668ead..1bbfd7def 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -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