]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: don't remove ECHOCTL from c_lflag
authorKarel Zak <kzak@redhat.com>
Mon, 3 Jun 2013 12:06:18 +0000 (14:06 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Jun 2013 09:24:11 +0000 (11:24 +0200)
It's really unexpected that arrows keys move cursor when agetty/login
asks for login name or password.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=969458
Signed-off-by: Karel Zak <kzak@redhat.com>
include/ttyutils.h

index 8882af2cb41ccd3195c77ade2be4a44596245cb8..13495ba96851c1216e7b44a779493ebeed6b64b7 100644 (file)
@@ -76,8 +76,8 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
        tp->c_oflag |=  (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
        tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \
                            NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
-       tp->c_lflag |=  (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE);
-       tp->c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | TOSTOP);
+       tp->c_lflag |=  (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE|ECHOCTL);
+       tp->c_lflag &= ~(ECHONL|ECHOPRT | NOFLSH | TOSTOP);
 
        if ((flags & UL_TTY_KEEPCFLAGS) == 0) {
                tp->c_cflag |=  (CREAD | CS8 | HUPCL);
@@ -122,6 +122,4 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
        tp->c_cc[VEOL2]    = _POSIX_VDISABLE;
 }
 
-
-
 #endif /* UTIL_LINUX_TTYUTILS_H */