From ee978576b10cf0d62d7ef2081fa627e21dbf9d88 Mon Sep 17 00:00:00 2001 From: Sami Loone Date: Tue, 9 Feb 2021 10:46:36 +0100 Subject: [PATCH] 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 --- include/ttyutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ttyutils.h b/include/ttyutils.h index f164a580f..5f58460d6 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)