Lines Matching refs:tty
94 int fd; /* tty device file descriptor */
115 struct ttyfd tty;
179 if (sc->tty.opened) {
181 * Flush any unread input from the tty buffer.
184 nread = read(sc->tty.fd, flushbuf, sizeof(flushbuf));
191 * on the tty fd.
220 if (sc->tty.opened) {
248 if (sc->tty.opened) {
270 ttyopen(&sc->tty);
271 sc->mev = mevent_add(sc->tty.fd, EVF_READ, uart_drain, sc);
336 assert(fd == sc->tty.fd);
347 (void) ttyread(&sc->tty);
350 ((ch = ttyread(&sc->tty)) != -1)) {
387 } else if (sc->tty.opened) {
388 ttywrite(&sc->tty, value);
620 sc->tty.fd = fd;
621 sc->tty.opened = true;
640 sc->tty.fd = STDIN_FILENO;
641 sc->tty.opened = true;
651 retval = fcntl(sc->tty.fd, F_SETFL, O_NONBLOCK);