diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-06 14:49:32 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-07 08:31:40 +0100 |
commit | 791469bd4fb1eba09ea8464795f100d7dd09379e (patch) | |
tree | a9f2757628501ce35f59868acdddf4b5b8c8a498 /cpukit | |
parent | tests: Use normal console for user input tests (diff) | |
download | rtems-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.c | 6 |
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]) |