summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-06 14:49:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-07 08:31:40 +0100
commit791469bd4fb1eba09ea8464795f100d7dd09379e (patch)
treea9f2757628501ce35f59868acdddf4b5b8c8a498 /cpukit
parenttests: Use normal console for user input tests (diff)
downloadrtems-791469bd4fb1eba09ea8464795f100d7dd09379e.tar.bz2
termios: Fix canonical mode
In canonical mode, input is made available line by line. We must stop the canonical buffer filling upon reception of an end-of-line character. Close #3218.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/termios.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 7a114a74b9..8303e9f18d 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -1570,8 +1570,10 @@ fillBufferQueue (struct rtems_termios_tty *tty)
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
- if (siproc (c, tty))
- wait = false;
+ if (siproc (c, tty)) {
+ /* In canonical mode, input is made available line by line */
+ return;
+ }
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])