diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2005-10-16 20:22:56 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2005-10-16 20:22:56 +0000 |
commit | 733634738ed6c3de9cd7937fdecdcaaa5555b03f (patch) | |
tree | 136df2f5eb3978a913bbef50def66e4c0eb9606d | |
parent | a9c76d92d2f1973701e47abbb31b9c53d10a0efd (diff) | |
download | src-733634738ed6c3de9cd7937fdecdcaaa5555b03f.tar.gz src-733634738ed6c3de9cd7937fdecdcaaa5555b03f.zip |
Notes
-rw-r--r-- | sys/dev/cx/if_cx.c | 3 | ||||
-rw-r--r-- | sys/dev/cy/cy.c | 2 | ||||
-rw-r--r-- | sys/dev/digi/digi.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 | 2 | ||||
-rw-r--r-- | sys/dev/si/si.c | 2 | ||||
-rw-r--r-- | sys/dev/sio/sio.c | 2 | ||||
-rw-r--r-- | sys/dev/uart/uart_tty.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ubser.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ucom.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/ucycom.c | 2 | ||||
-rw-r--r-- | sys/kern/tty.c | 6 | ||||
-rw-r--r-- | sys/pc98/cbus/sio.c | 2 | ||||
-rw-r--r-- | sys/sys/tty.h | 3 |
15 files changed, 19 insertions, 17 deletions
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c index 8cf29127afec..c6ebc3b52367 100644 --- a/sys/dev/cx/if_cx.c +++ b/sys/dev/cx/if_cx.c @@ -898,8 +898,7 @@ static int cx_attach (device_t dev) cx_register_modem (c, &cx_modem); CX_UNLOCK (bd); - ttycreate(d->tty, NULL, 0, MINOR_CALLOUT, - "x%r%r", b->num, c->num); + ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num); d->devt = make_dev (&cx_cdevsw, b->num*NCHAN + c->num + 64, UID_ROOT, GID_WHEEL, 0600, "cx%d", b->num*NCHAN + c->num); d->devt->si_drv1 = d; callout_init (&d->dcd_timeout_handle, diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index d6fe330938ec..75acea55ea09 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -433,7 +433,7 @@ cyattach_common(cy_addr cy_iobase, int cy_align) swi_add(&clk_ithd, "cy", cypoll, NULL, SWI_CLOCK, 0, &cy_slow_ih); } - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "c%r%r", + ttycreate(tp, TS_CALLOUT, "c%r%r", adapter, unit % CY_MAX_PORTS); } } diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 5635b4e4a38c..b30542e97157 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -588,7 +588,7 @@ digi_init(struct digi_softc *sc) ttyinitmode(tp, 0, 0); port->send_ring = 1; /* Default action on signal RI */ - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "D%r%r", sc->res.unit, i); + ttycreate(tp, TS_CALLOUT, "D%r%r", sc->res.unit, i); } sc->hidewin(sc); diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 071dbc777efc..d8a825973f31 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -301,7 +301,7 @@ rc_attach(device_t dev) tp->t_break = rc_break; tp->t_close = rc_close; tp->t_stop = rc_stop; - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "m%d", chan + base); + ttycreate(tp, TS_CALLOUT, "m%d", chan + base); } error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_TTY, rc_intr, sc, diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index e336bca461d1..c2e8a6474ea5 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -826,7 +826,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports) rp->rp_cts = (ChanStatus & CTS_ACT) != 0; line = (unit << 5) | (aiop << 3) | chan; rp_table(line) = rp; - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "R%r", port); + ttycreate(tp, TS_CALLOUT, "R%r", port); } } diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index a41d3282f9a4..1fcd8fe1042c 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -453,7 +453,7 @@ sabtty_attach(device_t dev) tp->t_stop = sabttystop; tp->t_open = sabttyopen; - ttycreate(tp, NULL, 0, 0, "z%r", device_get_unit(dev)); + ttycreate(tp, 0, "z%r", device_get_unit(dev)); if (sabtty_console(dev, mode, sizeof(mode))) { if (sscanf(mode, "%d,%d,%c,%d,%c", &baud, &clen, &parity, diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 2f9f872668c8..8bbb8b85e04d 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -552,7 +552,7 @@ try_next: tp->t_oproc = si_start; tp->t_param = siparam; tp->t_stop = si_stop; - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "A%r%r", unit, x); + ttycreate(tp, TS_CALLOUT, "A%r%r", unit, x); } try_next2: if (modp->sm_next == 0) { diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index f09af5866fa2..ddfd9e966e6e 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -1099,7 +1099,7 @@ determined_type: ; } /* We're ready, open the doors... */ - ttycreate(tp, NULL, unit, MINOR_CALLOUT, "d%r", unit); + ttycreate(tp, TS_CALLOUT, "d%r", unit); return (0); } diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 6eb573be44fb..a2219c67cb2e 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -380,7 +380,7 @@ uart_tty_attach(struct uart_softc *sc) swi_add(&tty_ithd, uart_driver_name, uart_tty_intr, sc, SWI_TTY, INTR_TYPE_TTY, &sc->sc_softih); - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "u%r", unit); + ttycreate(tp, TS_CALLOUT, "u%r", unit); return (0); } diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 8158f47ad297..0d17a5830d73 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -353,7 +353,7 @@ USB_ATTACH(ubser) tp->t_open = ubseropen; tp->t_close = ubserclose; tp->t_modem = ubsermodem; - ttycreate(tp, NULL, 0, 0, "y%r%r", USBDEVUNIT(sc->sc_dev), i); + ttycreate(tp, 0, "y%r%r", USBDEVUNIT(sc->sc_dev), i); } diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 0260cb6d8c9f..9d028f7b1e21 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -168,7 +168,7 @@ ucom_attach(struct ucom_softc *sc) DPRINTF(("ucom_attach: tty_attach tp = %p\n", tp)); - ttycreate(tp, NULL, unit, MINOR_CALLOUT, "U%d", unit); + ttycreate(tp, TS_CALLOUT, "U%d", unit); DPRINTF(("ucom_attach: ttycreate: ttyU%d\n", unit)); return (0); diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c index 2c32a80b4937..9d6dee7ec05e 100644 --- a/sys/dev/usb/ucycom.c +++ b/sys/dev/usb/ucycom.c @@ -284,7 +284,7 @@ ucycom_attach(device_t dev) "output bytes"); /* create character device node */ - ttycreate(sc->sc_tty, NULL, 0, 0, "y%r", device_get_unit(sc->sc_dev)); + ttycreate(sc->sc_tty, 0, "y%r", device_get_unit(sc->sc_dev)); return (0); } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 62634321a723..62e3028edf43 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2900,9 +2900,11 @@ ttypurge(struct cdev *dev) */ int -ttycreate(struct tty *tp, struct cdevsw *csw, int unit, int flags, const char *fmt, ...) +ttycreate(struct tty *tp, int flags, const char *fmt, ...) { char namebuf[SPECNAMELEN - 3]; /* XXX space for "tty" */ + struct cdevsw *csw = NULL; + int unit = 0; va_list ap; struct cdev *cp; int i, minor, sminor, sunit; @@ -2952,7 +2954,7 @@ ttycreate(struct tty *tp, struct cdevsw *csw, int unit, int flags, const char *f cp->si_drv2 = &tp->t_lock_in; cp->si_tty = tp; - if (flags & MINOR_CALLOUT) { + if (flags & TS_CALLOUT) { cp = make_dev(csw, minor | MINOR_CALLOUT, UID_UUCP, GID_DIALER, 0660, "cua%s", namebuf); dev_depends(tp->t_dev, cp); diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index f8b5181000b3..b3638d7ef98e 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -1762,7 +1762,7 @@ determined_type: ; } /* We're ready, open the doors... */ - ttycreate(tp, NULL, unit, MINOR_CALLOUT, "d%r", unit); + ttycreate(tp, TS_CALLOUT, "d%r", unit); return (0); } diff --git a/sys/sys/tty.h b/sys/sys/tty.h index d9f104aef81d..ccfd3507cf5b 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -253,6 +253,7 @@ struct xtty { #define TS_DTR_WAIT 0x1000000 /* DTR hold-down between sessions */ #define TS_GONE 0x2000000 /* Hardware detached */ +#define TS_CALLOUT 0x4000000 /* Callout devices */ /* Character type information. */ #define ORDINARY 0 @@ -350,7 +351,7 @@ void ttychars(struct tty *tp); int ttycheckoutq(struct tty *tp, int wait); void ttyconsolemode(struct tty *tp, int speed); int tty_close(struct tty *tp); -int ttycreate(struct tty *tp, struct cdevsw *, int unit, int flags, const char *fmt, ...) __printflike(5, 6); +int ttycreate(struct tty *tp, int flags, const char *fmt, ...) __printflike(3, 4); int ttydtrwaitsleep(struct tty *tp); void ttydtrwaitstart(struct tty *tp); void ttyflush(struct tty *tp, int rw); |