Lines Matching defs:tty
133 struct ttyfd tty;
197 if (sc->tty.opened) {
199 * Flush any unread input from the tty buffer.
202 nread = read(sc->tty.rfd, flushbuf, sizeof(flushbuf));
209 * on the tty fd.
238 if (sc->tty.opened) {
266 if (sc->tty.opened) {
288 ttyopen(&sc->tty);
289 sc->mev = mevent_add(sc->tty.rfd, EVF_READ, uart_drain, sc);
314 * Always assert DCD and DSR so tty open doesn't block
386 assert(fd == sc->tty.rfd);
397 (void) ttyread(&sc->tty);
400 ((ch = ttyread(&sc->tty)) != -1)) {
437 } else if (sc->tty.opened) {
438 ttywrite(&sc->tty, value);
659 sc->tty.rfd = STDIN_FILENO;
660 sc->tty.wfd = STDOUT_FILENO;
661 sc->tty.opened = true;
663 if (fcntl(sc->tty.rfd, F_SETFL, O_NONBLOCK) != 0)
665 if (fcntl(sc->tty.wfd, F_SETFL, O_NONBLOCK) != 0)
670 if (caph_rights_limit(sc->tty.rfd, &rights) == -1)
672 if (caph_ioctls_limit(sc->tty.rfd, cmds, nitems(cmds)) == -1)
699 sc->tty.rfd = sc->tty.wfd = fd;
700 sc->tty.opened = true;