]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: map NL to CR-NL on output in initial termios settings
authorKarel Zak <kzak@redhat.com>
Wed, 19 Dec 2012 09:24:23 +0000 (10:24 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 19 Dec 2012 09:24:23 +0000 (10:24 +0100)
(See also 9c62a2326e6e39a5e759830b0b9d91696166fb45 agetty patch).

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/sulogin.c

index 810168de2f2324418a860fb8af068decf0b48390..8416e3e0a4c35031b81ba013e4db5676deb8f3a0 100644 (file)
@@ -114,8 +114,10 @@ static void tcinit(struct console *con)
                if (!ispeed) ispeed = TTYDEF_SPEED;
                if (!ospeed) ospeed = TTYDEF_SPEED;
 
-               tio->c_iflag = tio->c_lflag = tio->c_oflag = 0;
                tio->c_cflag = CREAD | CS8 | HUPCL | (tio->c_cflag & CLOCAL);
+               tio->c_iflag = 0;
+               tio->c_lflag = 0;
+               tio->c_oflag &= OPOST | ONLCR;
 
                cfsetispeed(tio, ispeed);
                cfsetospeed(tio, ospeed);