summaryrefslogtreecommitdiff
path: root/include/ttyutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ttyutils.h')
-rw-r--r--include/ttyutils.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/ttyutils.h b/include/ttyutils.h
index 8882af2cb..4f2fd8848 100644
--- a/include/ttyutils.h
+++ b/include/ttyutils.h
@@ -13,6 +13,9 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_SYS_TTYDEFAULTS_H
+#include <sys/ttydefaults.h>
+#endif
/* Some shorthands for control characters. */
#define CTL(x) ((x) ^ 0100) /* Assumes ASCII dialect */
@@ -76,8 +79,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 +125,4 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
tp->c_cc[VEOL2] = _POSIX_VDISABLE;
}
-
-
#endif /* UTIL_LINUX_TTYUTILS_H */