summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-23 09:12:36 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-02-28 08:51:15 +0100
commitd60c2d7943081e464be51ccf25977328980c10e0 (patch)
treed017eab6989e81a96cdb44866aaaa01c59539d16
parenttermios: Add kqueue() and poll() support (diff)
downloadrtems-d60c2d7943081e464be51ccf25977328980c10e0.tar.bz2
termios: Simplify rtems_termios_read_tty()
Remove dead code. Update #2914.
-rw-r--r--cpukit/libcsupport/src/termios.c15
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++];