diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-02-23 09:12:36 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-02-28 08:51:15 +0100 |
commit | d60c2d7943081e464be51ccf25977328980c10e0 (patch) | |
tree | d017eab6989e81a96cdb44866aaaa01c59539d16 /cpukit/libcsupport | |
parent | 5bfeddc0c27b7cd896efd8c0b6ef2b5682ec4640 (diff) |
termios: Simplify rtems_termios_read_tty()
Remove dead code.
Update #2914.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 5067f6c465..f13e867f7d 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -1369,7 +1369,7 @@ siproc (unsigned char c, struct rtems_termios_tty *tty) /* * Fill the input buffer by polling the device */ -static rtems_status_code +static void fillBufferPoll (struct rtems_termios_tty *tty) { int n; @@ -1416,13 +1416,12 @@ fillBufferPoll (struct rtems_termios_tty *tty) } } } - return RTEMS_SUCCESSFUL; } /* * Fill the input buffer from the raw input queue */ -static rtems_status_code +static void fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; @@ -1484,7 +1483,6 @@ fillBufferQueue (struct rtems_termios_tty *tty) break; } } - return RTEMS_SUCCESSFUL; } static uint32_t @@ -1496,17 +1494,12 @@ rtems_termios_read_tty (struct rtems_termios_tty *tty, char *buffer, count = initial_count; if (tty->cindex == tty->ccount) { - rtems_status_code sc; - tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->handler.poll_read != NULL && tty->handler.mode == TERMIOS_POLLED) - sc = fillBufferPoll (tty); + fillBufferPoll (tty); else - sc = fillBufferQueue (tty); - - if (sc != RTEMS_SUCCESSFUL) - tty->cindex = tty->ccount = 0; + fillBufferQueue (tty); } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; |