]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/sclp_vt220: Convert newlines to CRLF instead of LFCR
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 14 Oct 2024 05:50:07 +0000 (07:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Oct 2024 13:40:42 +0000 (15:40 +0200)
commit41693253973ed553217e71255830227dae030544
tree86d603202cec9ff78486704ea7189366ed81bcbb
parent0bd9a30c22afb5da203386b811ec31429d2caa78
s390/sclp_vt220: Convert newlines to CRLF instead of LFCR

commit dee3df68ab4b00fff6bdf9fc39541729af37307c upstream.

According to the VT220 specification the possible character combinations
sent on RETURN are only CR or CRLF [0].

The Return key sends either a CR character (0/13) or a CR
character (0/13) and an LF character (0/10), depending on the
set/reset state of line feed/new line mode (LNM).

The sclp/vt220 driver however uses LFCR. This can confuse tools, for
example the kunit runner.

Link: https://vt100.net/docs/vt220-rm/chapter3.html#S3.2
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Link: https://lore.kernel.org/r/20241014-s390-kunit-v1-2-941defa765a6@linutronix.de
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/char/sclp_vt220.c