--- //depot/user/wkoszek/wkoszek_tty/src/sys/dev/cy/cy.c 2007/12/15 11:55:01 +++ src/sys/dev/cy/cy.c 2007/12/27 16:03:33 @@ -56,7 +56,7 @@ */ #undef Smarts /* Enable slightly more CD1400 intelligence. Mainly * the output CR/LF processing, plus we can avoid a - * few checks usually done in ttyinput(). + * few checks usually done in termios_input(). * * XXX not fully implemented, and not particularly * worthwhile. @@ -1419,7 +1419,7 @@ opt |= CD1400_COR4_IGNCR; #ifdef Smarts /* - * we need a new ttyinput() for this, as we don't want to + * we need a new termios_input() for this, as we don't want to * have ICRNL && INLCR being done in both layers, or to have * synchronisation problems */ @@ -1995,7 +1995,7 @@ int cyinput(int c, struct tty *tp) { - /* XXX duplicate ttyinput(), but without the IXOFF/IXON/ISTRIP/IPARMRK + /* XXX duplicate termios_input(), but without the IXOFF/IXON/ISTRIP/IPARMRK * bits, as they are done by the CD1400. Hardly worth the effort, * given that high-throughput session are raw anyhow. */ --- //depot/user/wkoszek/wkoszek_tty/src/sys/dev/snp/snp.c 2007/12/26 12:35:37 +++ src/sys/dev/snp/snp.c 2007/12/27 16:03:33 @@ -55,13 +55,13 @@ }; static struct linesw snpdisc = { - .l_open = tty_open, + .l_open = termios_open, .l_close = snplclose, - .l_read = ttread, + .l_read = termios_read, .l_write = snplwrite, .l_ioctl = l_nullioctl, - .l_rint = ttyinput, - .l_start = ttstart, + .l_rint = termios_input, + .l_start = termios_start, .l_modem = ttymodem }; @@ -146,7 +146,7 @@ error = snp_down(snp); if (error != 0) return (error); - error = ttylclose(tp, flag); + error = termios_close(tp, flag); return (error); } @@ -179,7 +179,7 @@ uio2.uio_segflg = UIO_SYSSPACE; uio2.uio_rw = UIO_WRITE; uio2.uio_td = uio->uio_td; - error = ttwrite(tp, &uio2, flag); + error = termios_write(tp, &uio2, flag); if (error != 0) break; free(ibuf, M_SNP); @@ -239,7 +239,7 @@ if ((error = uiomove(c, len, uio)) != 0) return (error); for (i=0; i < len; i++) { - if (ttyinput(c[i], tp)) + if (termios_input(c[i], tp)) return (EIO); } } --- //depot/user/wkoszek/wkoszek_tty/src/sys/kern/tty.c 2007/12/27 02:11:51 +++ src/sys/kern/tty.c 2007/12/27 16:03:33 @@ -290,7 +290,7 @@ * Initial open of tty, or (re)entry to standard tty line discipline. */ int -tty_open(struct cdev *device, struct tty *tp) +termios_open(struct cdev *device, struct tty *tp) { TTY_LOCK(); @@ -370,7 +370,7 @@ * Process input of a single character received on a tty. */ int -ttyinput(int c, struct tty *tp) +termios_input(int c, struct tty *tp) { tcflag_t iflag, lflag; cc_t *cc; @@ -718,7 +718,7 @@ CLR(tp->t_state, TS_TTSTOP); startoutput: TTY_UNLOCK(); - return (ttstart(tp)); + return (termios_start(tp)); } /* @@ -1189,7 +1189,7 @@ ISSET(tp->t_lflag, FLUSHO)) { CLR(tp->t_lflag, FLUSHO); CLR(tp->t_state, TS_TTSTOP); - ttstart(tp); + termios_start(tp); } TTY_UNLOCK(); break; @@ -1589,7 +1589,7 @@ if (ISSET(tp->t_iflag, IXOFF) && tp->t_cc[VSTOP] != _POSIX_VDISABLE && putc(tp->t_cc[VSTOP], &tp->t_outq) != 0) CLR(tp->t_state, TS_TBLOCK); /* try again later */ - ttstart(tp); + termios_start(tp); } /* @@ -1607,7 +1607,7 @@ if (ISSET(tp->t_iflag, IXOFF) && tp->t_cc[VSTART] != _POSIX_VDISABLE && putc(tp->t_cc[VSTART], &tp->t_outq) != 0) SET(tp->t_state, TS_TBLOCK); /* try again later */ - ttstart(tp); + termios_start(tp); } #ifdef notyet @@ -1626,14 +1626,14 @@ TTY_LOCK(); CLR(tp->t_state, TS_TIMEOUT); - ttstart(tp); + termios_start(tp); TTY_UNLOCK(); } #endif int -ttstart(struct tty *tp) +termios_start(struct tty *tp) { TTY_LOCK_ASSERT(); @@ -1646,7 +1646,7 @@ * "close" a line discipline */ int -ttylclose(struct tty *tp, int flag) +termios_close(struct tty *tp, int flag) { /* XXXRW: Locking over ttywflush and ttyflush? */ @@ -1662,7 +1662,7 @@ * Returns 0 if the line should be turned off, otherwise 1. */ int -ttymodem(struct tty *tp, int flag) +termios_modem(struct tty *tp, int flag) { TTY_LOCK_ASSERT(); @@ -1675,7 +1675,7 @@ if (flag) { CLR(tp->t_state, TS_CAR_OFLOW); CLR(tp->t_state, TS_TTSTOP); - ttstart(tp); + termios_start(tp); } else if (!ISSET(tp->t_state, TS_CAR_OFLOW)) { SET(tp->t_state, TS_CAR_OFLOW); SET(tp->t_state, TS_TTSTOP); @@ -1744,7 +1744,7 @@ tp->t_rawq.c_cbmax = tq.c_cbmax; tp->t_rawq.c_cbreserved = tq.c_cbreserved; while ((c = getc(&tq)) >= 0) - ttyinput(c, tp); + termios_input(c, tp); CLR(tp->t_state, TS_TYPEN); } @@ -1752,7 +1752,7 @@ * Process a read call on a tty device. */ int -ttread(struct tty *tp, struct uio *uio, int flag) +termios_read(struct tty *tp, struct uio *uio, int flag) { struct clist *qp; int c; @@ -2059,7 +2059,7 @@ } if (tp->t_outq.c_cc > hiwat + OBUFSIZ + 100) { while (tp->t_outq.c_cc > hiwat) { - ttstart(tp); + termios_start(tp); if (tp->t_outq.c_cc <= hiwat) break; if (!wait) @@ -2081,7 +2081,7 @@ * Process a write call on a tty device. */ int -ttwrite(struct tty *tp, struct uio *uio, int flag) +termios_write(struct tty *tp, struct uio *uio, int flag) { char *cp = NULL; int cc, ce; @@ -2194,7 +2194,7 @@ tp->t_rocount = 0; if (ttyoutput(*cp, tp) >= 0) { /* No Clists, wait a bit. */ - ttstart(tp); + termios_start(tp); if (flag & IO_NDELAY) { error = EWOULDBLOCK; goto out; @@ -2230,7 +2230,7 @@ tp->t_outcc += ce; if (i > 0) { /* No Clists, wait a bit. */ - ttstart(tp); + termios_start(tp); if (flag & IO_NDELAY) { error = EWOULDBLOCK; goto out; @@ -2245,7 +2245,7 @@ tp->t_outq.c_cc > hiwat) break; } - ttstart(tp); + termios_start(tp); } out: /* @@ -2257,9 +2257,9 @@ return (error); ovhiwat: - /* XXXRW: Previously, spltty() before ttstart(). */ + /* XXXRW: Previously, spltty() before termios_start(). */ TTY_LOCK(); - ttstart(tp); + termios_start(tp); /* * This can only occur if FLUSHO is set in t_lflag, * or if ttstart/oproc is synchronous (or very fast). @@ -2865,7 +2865,7 @@ if (c == '\n') (void)ttyoutput('\r', tp); (void)ttyoutput(c, tp); - ttstart(tp); + termios_start(tp); TTY_UNLOCK(); return (0); } @@ -2947,7 +2947,7 @@ /* * Allocate a tty struct. Clists in the struct will be allocated by - * tty_open(). + * termios_open(). */ struct tty * ttyalloc() @@ -3411,7 +3411,7 @@ && (!(t->c_iflag & PARMRK) || (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK)) && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN)) - && linesw[tp->t_line]->l_rint == ttyinput) + && linesw[tp->t_line]->l_rint == termios_input) tp->t_state |= TS_CAN_BYPASS_L_RINT; else tp->t_state &= ~TS_CAN_BYPASS_L_RINT; --- //depot/user/wkoszek/wkoszek_tty/src/sys/kern/tty_conf.c 2007/12/15 11:55:01 +++ src/sys/kern/tty_conf.c 2007/12/27 16:03:33 @@ -58,7 +58,7 @@ * XXX it probably doesn't matter what the entries other than the l_open * entry are here. The l_nullioctl and ttymodem entries still look fishy. * Reconsider the removal of nullmodem anyway. It was too much like - * ttymodem, but a completely null version might be useful. + * termios_modem, but a completely null version might be useful. */ static struct linesw nodisc = { @@ -69,18 +69,18 @@ .l_ioctl = l_nullioctl, .l_rint = l_norint, .l_start = l_nostart, - .l_modem = ttymodem + .l_modem = termios_modem, }; static struct linesw termios_disc = { - .l_open = tty_open, - .l_close = ttylclose, - .l_read = ttread, - .l_write = ttwrite, + .l_open = termios_open, + .l_close = termios_close, + .l_read = termios_read, + .l_write = termios_write, .l_ioctl = l_nullioctl, - .l_rint = ttyinput, - .l_start = ttstart, - .l_modem = ttymodem + .l_rint = termios_input, + .l_start = termios_start, + .l_modem = termios_modem, }; #ifdef COMPAT_43 --- //depot/user/wkoszek/wkoszek_tty/src/sys/kern/tty_pts.c 2007/12/15 11:55:01 +++ src/sys/kern/tty_pts.c 2007/12/27 16:03:33 @@ -451,7 +451,7 @@ * l_modem()s that ignore carrier drop make no sense for ptys but * may be in use because other parts of the line discipline make * sense for ptys. Recover by doing everything that a normal - * ttymodem() would have done except for sending a SIGHUP. + * termios_modem() would have done except for sending a SIGHUP. */ if (tp->t_state & TS_ISOPEN) { tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED); --- //depot/user/wkoszek/wkoszek_tty/src/sys/kern/tty_pty.c 2007/12/15 11:55:01 +++ src/sys/kern/tty_pty.c 2007/12/27 16:03:33 @@ -371,7 +371,7 @@ * l_modem()s that ignore carrier drop make no sense for ptys but * may be in use because other parts of the line discipline make * sense for ptys. Recover by doing everything that a normal - * ttymodem() would have done except for sending a SIGHUP. + * termios_modem() would have done except for sending a SIGHUP. */ if (tp->t_state & TS_ISOPEN) { tp->t_state &= ~(TS_CARR_ON | TS_CONNECTED); --- //depot/user/wkoszek/wkoszek_tty/src/sys/kern/tty_subr.c 2007/12/26 23:02:53 +++ src/sys/kern/tty_subr.c 2007/12/27 16:03:33 @@ -95,7 +95,7 @@ { /* * Allocate an initial base set of cblocks as a 'slush'. - * We allocate non-slush cblocks with each initial tty_open() and + * We allocate non-slush cblocks with each initial termios_open() and * deallocate them with each tty_close(). * We should adjust the slush allocation. This can't be done in * the i/o routines because they are sometimes called from --- //depot/user/wkoszek/wkoszek_tty/src/sys/netgraph/ng_tty.c 2007/12/15 11:55:01 +++ src/sys/netgraph/ng_tty.c 2007/12/27 16:03:33 @@ -134,7 +134,7 @@ .l_ioctl = ngt_tioctl, .l_rint = ngt_input, .l_start = ngt_start, - .l_modem = ttymodem, + .l_modem = termios_modem, }; /* Netgraph node type descriptor */ --- //depot/user/wkoszek/wkoszek_tty/src/sys/sys/tty.h 2007/12/17 20:08:17 +++ src/sys/sys/tty.h 2007/12/27 16:03:33 @@ -345,13 +345,13 @@ int tputchar(int c, struct tty *tp); int ttcompat(struct tty *tp, u_long com, caddr_t data, int flag); int ttioctl(struct tty *tp, u_long com, void *data, int flag); -int ttread(struct tty *tp, struct uio *uio, int flag); +int termios_read(struct tty *tp, struct uio *uio, int flag); void ttrstrt(void *tp); void ttsetwater(struct tty *tp); int ttspeedtab(int speed, struct speedtab *table); -int ttstart(struct tty *tp); +int termios_start(struct tty *tp); void ttwakeup(struct tty *tp); -int ttwrite(struct tty *tp, struct uio *uio, int flag); +int termios_write(struct tty *tp, struct uio *uio, int flag); void ttwwakeup(struct tty *tp); struct tty *ttyalloc(void); void ttyblock(struct tty *tp); @@ -367,11 +367,11 @@ void ttygone(struct tty *tp); void ttyinfo(struct tty *tp); void ttyinitmode(struct tty *tp, int echo, int speed); -int ttyinput(int c, struct tty *tp); -int ttylclose(struct tty *tp, int flag); +int termios_input(int c, struct tty *tp); +int termios_close(struct tty *tp, int flag); void ttyldoptim(struct tty *tp); -int ttymodem(struct tty *tp, int flag); -int tty_open(struct cdev *device, struct tty *tp); +int termios_modem(struct tty *tp, int flag); +int termios_open(struct cdev *device, struct tty *tp); int ttyref(struct tty *tp); int ttyrel(struct tty *tp); int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo);