diff options
author | phk <phk@FreeBSD.org> | 2004-07-15 20:47:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-07-15 20:47:41 +0000 |
commit | f00200d8a459bcf01e832c89518247e88ce28bf0 (patch) | |
tree | cb8932d8c884d3a6cc8f7e0616a4bdfa7fe0e5ee /sys | |
parent | 2f3742942cca7902c160ba9f75eae9a92e905e0f (diff) | |
download | FreeBSD-src-f00200d8a459bcf01e832c89518247e88ce28bf0.zip FreeBSD-src-f00200d8a459bcf01e832c89518247e88ce28bf0.tar.gz |
Preparation commit for the tty cleanups that will follow in the near
future:
rename ttyopen() -> tty_open() and ttyclose() -> tty_close().
We need the ttyopen() and ttyclose() for the new generic cdevsw
functions for tty devices in order to have consistent naming.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/promcons.c | 2 | ||||
-rw-r--r-- | sys/alpha/tlsb/zs_tlsb.c | 2 | ||||
-rw-r--r-- | sys/dev/cx/if_cx.c | 2 | ||||
-rw-r--r-- | sys/dev/cy/cy.c | 2 | ||||
-rw-r--r-- | sys/dev/dcons/dcons.c | 4 | ||||
-rw-r--r-- | sys/dev/digi/digi.c | 2 | ||||
-rw-r--r-- | sys/dev/nmdm/nmdm.c | 2 | ||||
-rw-r--r-- | sys/dev/ofw/ofw_console.c | 2 | ||||
-rw-r--r-- | sys/dev/rc/rc.c | 2 | ||||
-rw-r--r-- | sys/dev/rp/rp.c | 2 | ||||
-rw-r--r-- | sys/dev/sab/sab.c | 4 | ||||
-rw-r--r-- | sys/dev/si/si.c | 2 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 4 | ||||
-rw-r--r-- | sys/dev/snp/snp.c | 2 | ||||
-rw-r--r-- | sys/dev/sx/sx.c | 2 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.c | 2 | ||||
-rw-r--r-- | sys/dev/syscons/sysmouse.c | 2 | ||||
-rw-r--r-- | sys/dev/uart/uart_tty.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ubser.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/ucom.c | 6 | ||||
-rw-r--r-- | sys/dev/zs/zs.c | 4 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_drv.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/ssc.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_clist.c | 4 | ||||
-rw-r--r-- | sys/kern/tty.c | 8 | ||||
-rw-r--r-- | sys/kern/tty_conf.c | 2 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 2 | ||||
-rw-r--r-- | sys/kern/tty_subr.c | 4 | ||||
-rw-r--r-- | sys/net/ppp_tty.c | 2 | ||||
-rw-r--r-- | sys/pc98/cbus/sio.c | 4 | ||||
-rw-r--r-- | sys/pc98/pc98/sio.c | 4 | ||||
-rw-r--r-- | sys/sys/tty.h | 4 |
32 files changed, 49 insertions, 49 deletions
diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 6ced298..30db04d 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -149,7 +149,7 @@ promclose(dev, flag, mode, td) untimeout(promtimeout, tp, promtimeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return 0; } diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 90eadda..420d685 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -318,7 +318,7 @@ zsclose(struct cdev *dev, int flag, int mode, struct thread *td) s = spltty(); untimeout(zs_poll_intr, sc, sc->zst); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); splx(s); return (0); diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index c2b877d..638e947 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -1640,7 +1640,7 @@ static int cx_close (struct cdev *dev, int flag, int mode, struct thread *td) cx_set_rts (d->chan, 0); ttydtrwaitstart(d->tty); } - ttyclose (d->tty); + tty_close (d->tty); splx (s); d->callout = 0; diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 47d75ad..04df7e1 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -786,7 +786,7 @@ sioclose(dev, flag, mode, td) ttyld_close(tp, flag); disc_optim(tp, &tp->t_termios, com); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); #ifdef broken /* session holds a ref to the tty; can't deallocate */ diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 2677444..bc33dbe 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -230,7 +230,7 @@ dcons_close(struct cdev *dev, int flag, int mode, struct THREAD *td) tp = dev->si_tty; if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); } return (0); @@ -597,7 +597,7 @@ dcons_detach(int port) if (tp->t_state & TS_ISOPEN) { printf("dcons: still opened\n"); ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } /* XXX * must wait until all device are closed. diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index b08cd58..e0cd291 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -893,7 +893,7 @@ digiclose(struct cdev *dev, int flag, int mode, struct thread *td) ttyld_close(tp, flag); ttyldoptim(tp); digihardclose(port); - ttyclose(tp); + tty_close(tp); if (--sc->opencnt == 0) splx(s); return (0); diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 280bb9c..41a8704 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -294,7 +294,7 @@ static int nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) { - return (ttyclose(dev->si_tty)); + return (tty_close(dev->si_tty)); } static void diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 0e1f91d..986ad2f 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -169,7 +169,7 @@ ofw_dev_close(struct cdev *dev, int flag, int mode, struct thread *td) /* XXX Should be replaced with callout_stop(9) */ untimeout(ofw_timeout, tp, ofw_timeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 49eedbe..ddb0d42 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -951,7 +951,7 @@ rcclose(struct cdev *dev, int flag, int mode, d_thread_t *td) ttyld_close(tp, flag); ttyldoptim(tp); rc_hardclose(rc); - ttyclose(tp); + tty_close(tp); splx(s); KASSERT(sc->sc_opencount > 0, ("rcclose: non-positive open count")); sc->sc_opencount--; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 87412b1..da32de8 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1138,7 +1138,7 @@ rpclose(dev, flag, mode, td) rphardclose(rp); tp->t_state &= ~TS_BUSY; - ttyclose(tp); + tty_close(tp); splx(oldspl); diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index ab84e36..eb9a4f3 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -706,7 +706,7 @@ sabttyopen(struct cdev *dev, int flags, int mode, struct thread *td) /* XXX handle initial DCD */ } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error != 0) return (error); @@ -728,7 +728,7 @@ sabttyclose(struct cdev *dev, int flags, int mode, struct thread *td) return (0); ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 7a64b7b..aea1172 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -804,7 +804,7 @@ siclose(struct cdev *dev, int flag, int mode, struct thread *td) } sihardclose(pp); - ttyclose(tp); + tty_close(tp); pp->sp_state &= ~SS_OPEN; out: diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 5f099f9..f9086db 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -467,7 +467,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -1419,7 +1419,7 @@ sioclose(dev, flag, mode, td) ttyld_close(tp, flag); ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index a352707..6103a5d 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -52,7 +52,7 @@ static struct cdevsw snp_cdevsw = { }; static struct linesw snpdisc = { - .l_open = ttyopen, + .l_open = tty_open, .l_close = snplclose, .l_read = ttread, .l_write = snplwrite, diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 5611016..4995292 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -548,7 +548,7 @@ sxclose( /* ok. we are now still on the right track.. nuke the hardware */ sxhardclose(pp); - ttyclose(tp); + tty_close(tp); pp->sp_state &= ~SX_SS_OPEN; out: diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 2620ea7..669c256 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -557,7 +557,7 @@ scclose(struct cdev *dev, int flag, int mode, struct thread *td) } spltty(); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); spl0(); return(0); } diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index db2487d..ce8fe12 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -110,7 +110,7 @@ smclose(struct cdev *dev, int flag, int mode, struct thread *td) s = spltty(); mouse_level = 0; ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); splx(s); return 0; diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index f63d4f0..c4d0220 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -453,7 +453,7 @@ uart_tty_open(struct cdev *dev, int flags, int mode, struct thread *td) return (error); goto loop; } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) return (error); error = ttyld_open(tp, dev); @@ -492,7 +492,7 @@ uart_tty_close(struct cdev *dev, int flags, int mode, struct thread *td) sc->sc_pps.ppsparam.mode = 0; ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); wakeup(sc); wakeup(TSA_CARR_ON(tp)); KASSERT(!(tp->t_state & TS_ISOPEN), ("foo")); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 9b43f54..34cee90 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -442,7 +442,7 @@ bad: if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } destroy_dev(sc->dev[i]); @@ -476,7 +476,7 @@ USB_DETACH(ubser) if (tp != NULL) { if (tp->t_state & TS_ISOPEN) { ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } destroy_dev(sc->dev[i]); @@ -907,7 +907,7 @@ ubser_open(struct cdev *dev, int flag, int mode, usb_proc_ptr p) wakeup(&sc->sc_opening); splx(s); - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) goto bad; diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index b4759a7..9f84df7 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -208,7 +208,7 @@ ucom_detach(struct ucom_softc *sc) device_printf(sc->sc_dev, "still open, forcing close\n"); ttyld_close(tp, 0); - ttyclose(tp); + tty_close(tp); } } else { DPRINTF(("ucom_detach: no tty\n")); @@ -388,7 +388,7 @@ ucomopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) wakeup(&sc->sc_opening); splx(s); - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error) goto bad; @@ -457,7 +457,7 @@ ucomclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) s = spltty(); ttyld_close(tp, flag); ttyldoptim(tp); - ttyclose(tp); + tty_close(tp); splx(s); if (sc->sc_dying) diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 1c400eb0..ab13d09 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -492,7 +492,7 @@ zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td) /* XXX handle initial DCD */ } - error = ttyopen(dev, tp); + error = tty_open(dev, tp); if (error != 0) return (error); @@ -514,7 +514,7 @@ zsttyclose(struct cdev *dev, int flags, int mode, struct thread *td) return (0); ttyld_close(tp, flags); - ttyclose(tp); + tty_close(tp); return (0); } diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index ac38733..16aa04c 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -354,7 +354,7 @@ pcvt_close(struct cdev *dev, int flag, int mode, struct thread *td) ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); vsx->openf = 0; diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index eb03592..a475fb5 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -186,7 +186,7 @@ sscclose(struct cdev *dev, int flag, int mode, struct thread *td) untimeout(ssctimeout, tp, ssctimeouthandle); ttyld_close(tp, flag); - ttyclose(tp); + tty_close(tp); return 0; } diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c index cc4b32a..afa1277 100644 --- a/sys/kern/subr_clist.c +++ b/sys/kern/subr_clist.c @@ -81,8 +81,8 @@ clist_init(dummy) { /* * Allocate an initial base set of cblocks as a 'slush'. - * We allocate non-slush cblocks with each initial ttyopen() and - * deallocate them with each ttyclose(). + * We allocate non-slush cblocks with each initial tty_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 * interrupt handlers when it may be unsafe to call malloc(). diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 36fbb36..f0172df 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -230,7 +230,7 @@ SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait, * Initial open of tty, or (re)entry to standard tty line discipline. */ int -ttyopen(struct cdev *device, struct tty *tp) +tty_open(struct cdev *device, struct tty *tp) { int s; @@ -256,12 +256,12 @@ ttyopen(struct cdev *device, struct tty *tp) * Handle close() on a tty line: flush and set to initial state, * bumping generation number so that pending read/write calls * can detect recycling of the tty. - * XXX our caller should have done `spltty(); l_close(); ttyclose();' + * XXX our caller should have done `spltty(); l_close(); tty_close();' * and l_close() should have flushed, but we repeat the spltty() and * the flush in case there are buggy callers. */ int -ttyclose(struct tty *tp) +tty_close(struct tty *tp) { int s; @@ -2761,7 +2761,7 @@ ttyrel(struct tty *tp) /* * Allocate a tty struct. Clists in the struct will be allocated by - * ttyopen(). + * tty_open(). */ struct tty * ttymalloc(struct tty *tp) diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 488e383..77a9593 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -73,7 +73,7 @@ static struct linesw nodisc = { }; static struct linesw termios_disc = { - .l_open = ttyopen, + .l_open = tty_open, .l_close = ttylclose, .l_read = ttread, .l_write = ttwrite, diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 625189c..13b48be 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -207,7 +207,7 @@ ptsclose(struct cdev *dev, int flag, int mode, struct thread *td) tp = dev->si_tty; err = ttyld_close(tp, flag); - (void) ttyclose(tp); + (void) tty_close(tp); return (err); } diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c index cc4b32a..afa1277 100644 --- a/sys/kern/tty_subr.c +++ b/sys/kern/tty_subr.c @@ -81,8 +81,8 @@ clist_init(dummy) { /* * Allocate an initial base set of cblocks as a 'slush'. - * We allocate non-slush cblocks with each initial ttyopen() and - * deallocate them with each ttyclose(). + * We allocate non-slush cblocks with each initial tty_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 * interrupt handlers when it may be unsafe to call malloc(). diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index a76234d..3a14150 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -234,7 +234,7 @@ pppopen(dev, tp) * Line specific close routine, called from device close routine * and from ttioctl at >= splsofttty(). * Detach the tty from the ppp unit. - * Mimics part of ttyclose(). + * Mimics part of tty_close(). */ static int pppclose(tp, flag) diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 74fc077..636d753 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -798,7 +798,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -2142,7 +2142,7 @@ sioclose(dev, flag, mode, td) #endif ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 74fc077..636d753 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -798,7 +798,7 @@ siodetach(dev) if (com->tp && (com->tp->t_state & TS_ISOPEN)) { device_printf(dev, "still open, forcing close\n"); ttyld_close(com->tp, 0); - ttyclose(com->tp); + tty_close(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); @@ -2142,7 +2142,7 @@ sioclose(dev, flag, mode, td) #endif ttyldoptim(tp); comhardclose(com); - ttyclose(tp); + tty_close(tp); siosettimeout(); splx(s); if (com->gone) { diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 24e83ad..b5ea49d 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -311,7 +311,7 @@ void ttwwakeup(struct tty *tp); void ttyblock(struct tty *tp); void ttychars(struct tty *tp); int ttycheckoutq(struct tty *tp, int wait); -int ttyclose(struct tty *tp); +int tty_close(struct tty *tp); int ttydtrwaitsleep(struct tty *tp); void ttydtrwaitstart(struct tty *tp); void ttyflush(struct tty *tp, int rw); @@ -322,7 +322,7 @@ int ttylclose(struct tty *tp, int flag); void ttyldoptim(struct tty *tp); struct tty *ttymalloc(struct tty *tp); int ttymodem(struct tty *tp, int flag); -int ttyopen(struct cdev *device, struct tty *tp); +int tty_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); |