From: Sami Loone Date: Tue, 9 Feb 2021 09:46:36 +0000 (+0100) Subject: agetty: tty eol defaults to REPRINT X-Git-Tag: v2.37-rc1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee978576b10cf0d62d7ef2081fa627e21dbf9d88;p=thirdparty%2Futil-linux.git agetty: tty eol defaults to REPRINT Adapting tty eol settings from defaults misbehaves as CTRL('r') aka REPRINT is confused with CR. Consequently --skip-login does not set tty CR<->NL translations and thus acts against advertised CR as eol default. [kzak@redhat.com: It seems this issue has been introduced by commit f566447 where we merged sulogin and agetty terminal initialization together to the file include/ttyutils.h. The original agetty has really used .eol=13 (aka CR) for the default. The problem is invisible for sulogin(1) because it always asks for a password and .eol= is set to NL/CR, the same agetty when it asks for username.] Addresses: https://github.com/karelzak/util-linux/pull/1247 Signed-off-by: Karel Zak --- diff --git a/include/ttyutils.h b/include/ttyutils.h index f164a580fb..5f58460d6d 100644 --- a/include/ttyutils.h +++ b/include/ttyutils.h @@ -73,7 +73,7 @@ struct chardata { #define INIT_CHARDATA(ptr) do { \ (ptr)->erase = DEF_ERASE; \ (ptr)->kill = DEF_KILL; \ - (ptr)->eol = CTRL('r'); \ + (ptr)->eol = CR; \ (ptr)->parity = 0; \ (ptr)->capslock = 0; \ } while (0)