]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/3215: fix tty output containing tabs
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 13 Aug 2014 10:01:30 +0000 (12:01 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 6 Jan 2015 14:01:22 +0000 (15:01 +0100)
commita611d4e3b0f5aace35a0c2577548f0e46d46910e
tree292001793b4ee3383a16bd456c78f59e7bc48147
parent22c60914c060fc8c62f52526411b73ea29eef46f
s390/3215: fix tty output containing tabs

commit e512d56c799517f33b301d81e9a5e0ebf30c2d1e upstream.

git commit 37f81fa1f63ad38e16125526bb2769ae0ea8d332
"n_tty: do O_ONLCR translation as a single write"
surfaced a bug in the 3215 device driver. In combination this
broke tab expansion for tty ouput.

The cause is an asymmetry in the behaviour of tty3215_ops->write
vs tty3215_ops->put_char. The put_char function scans for '\t'
but the write function does not.

As the driver has logic for the '\t' expansion remove XTABS
from c_oflag of the initial termios as well.

Reported-by: Stephen Powell <zlinuxman@wowway.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/s390/char/con3215.c