diff options
Diffstat (limited to 'sys')
53 files changed, 185 insertions, 188 deletions
diff --git a/sys/arch/alpha/alpha/promcons.c b/sys/arch/alpha/alpha/promcons.c index ad333ab7a26..5df9fef0afa 100644 --- a/sys/arch/alpha/alpha/promcons.c +++ b/sys/arch/alpha/alpha/promcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: promcons.c,v 1.12 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: promcons.c,v 1.13 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: promcons.c,v 1.5 1996/11/13 22:20:55 cgd Exp $ */ /* @@ -100,7 +100,7 @@ promopen(dev, flag, mode, p) splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error == 0 && setuptimeout) { timeout_set(&prom_to, promtimeout, tp); timeout_add(&prom_to, 1); @@ -118,7 +118,7 @@ promclose(dev, flag, mode, p) struct tty *tp = prom_tty[unit]; timeout_del(&prom_to); - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return 0; } diff --git a/sys/arch/alpha/tc/scc.c b/sys/arch/alpha/tc/scc.c index b8fdf3a5e18..a5a47265404 100644 --- a/sys/arch/alpha/tc/scc.c +++ b/sys/arch/alpha/tc/scc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scc.c,v 1.25 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: scc.c,v 1.26 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: scc.c,v 1.58 2002/03/17 19:40:27 atatat Exp $ */ /* @@ -498,7 +498,7 @@ sccopen(dev, flag, mode, p) splx(s); if (error) return (error); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); return (error); } @@ -520,7 +520,7 @@ sccclose(dev, flag, mode, p) sc->scc_wreg[line].wr5 &= ~ZSWR5_BREAK; ttyoutput(0, tp); } - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); if ((tp->t_cflag & HUPCL) || (tp->t_state & TS_WOPEN) || !(tp->t_state & TS_ISOPEN)) (void) sccmctl(sc, line, 0, DMSET); diff --git a/sys/arch/arm/s3c2xx0/sscom.c b/sys/arch/arm/s3c2xx0/sscom.c index 062ba406aec..62d8df5c64c 100644 --- a/sys/arch/arm/s3c2xx0/sscom.c +++ b/sys/arch/arm/s3c2xx0/sscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sscom.c,v 1.16 2010/02/01 23:53:58 drahn Exp $ */ +/* $OpenBSD: sscom.c,v 1.17 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: sscom.c,v 1.29 2008/06/11 22:37:21 cegger Exp $ */ /* @@ -762,7 +762,7 @@ sscomopen(dev_t dev, int flag, int mode, struct proc *p) } splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error) goto bad; @@ -796,7 +796,7 @@ sscomclose(dev_t dev, int flag, int mode, struct proc *p) if (!ISSET(tp->t_state, TS_ISOPEN)) return 0; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); #if 0 diff --git a/sys/arch/aviion/dev/dart.c b/sys/arch/aviion/dev/dart.c index ab0698ec9aa..abbe4d799b3 100644 --- a/sys/arch/aviion/dev/dart.c +++ b/sys/arch/aviion/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.7 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: dart.c,v 1.8 2010/04/12 12:57:51 tedu Exp $ */ /* * Mach Operating System @@ -650,7 +650,7 @@ dartopen(dev_t dev, int flag, int mode, struct proc *p) */ tp->t_dev = dev; splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -667,7 +667,7 @@ dartclose(dev_t dev, int flag, int mode, struct proc *p) dart = &sc->sc_dart[port]; tp = dart->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index 935107d921e..f14822f878d 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.37 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: apci.c,v 1.38 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */ /*- @@ -368,7 +368,7 @@ apciopen(dev, flag, mode, p) splx(s); if (error == 0) - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error == 0) { /* clear errors, start timeout */ @@ -396,7 +396,7 @@ apciclose(dev, flag, mode, p) apci = sc->sc_apci; tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c index 40ace43a431..3a5b18d0959 100644 --- a/sys/arch/hp300/dev/dca.c +++ b/sys/arch/hp300/dev/dca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dca.c,v 1.38 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: dca.c,v 1.39 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */ /* @@ -400,7 +400,7 @@ dcaopen(dev, flag, mode, p) splx(s); if (error == 0) - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); return (error); } @@ -424,7 +424,7 @@ dcaclose(dev, flag, mode, p) dca = sc->sc_dca; tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c index 4ae07da8f0b..a344b8cc287 100644 --- a/sys/arch/hp300/dev/dcm.c +++ b/sys/arch/hp300/dev/dcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcm.c,v 1.32 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: dcm.c,v 1.33 2010/04/12 12:57:51 tedu Exp $ */ /* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */ /* @@ -549,7 +549,7 @@ dcmopen(dev, flag, mode, p) sc->sc_dev.dv_xname, port, tp->t_state, tp->t_flags); #endif if (error == 0) - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); return (error); } @@ -572,7 +572,7 @@ dcmclose(dev, flag, mode, p) sc = dcm_cd.cd_devs[board]; tp = sc->sc_tty[port]; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); diff --git a/sys/arch/hppa/dev/pdc.c b/sys/arch/hppa/dev/pdc.c index 75f57be5c74..8a5c3f3e267 100644 --- a/sys/arch/hppa/dev/pdc.c +++ b/sys/arch/hppa/dev/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.34 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: pdc.c,v 1.35 2010/04/12 12:57:51 tedu Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -231,7 +231,7 @@ pdcopen(dev, flag, mode, p) tp->t_state |= TS_CARR_ON; splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error == 0 && setuptimeout) pdctimeout(sc); @@ -253,7 +253,7 @@ pdcclose(dev, flag, mode, p) tp = sc->sc_tty; timeout_del(&sc->sc_to); - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return 0; } diff --git a/sys/arch/hppa64/dev/pdc.c b/sys/arch/hppa64/dev/pdc.c index 14b4f006714..362ae32f6a3 100644 --- a/sys/arch/hppa64/dev/pdc.c +++ b/sys/arch/hppa64/dev/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.6 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: pdc.c,v 1.7 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -221,7 +221,7 @@ pdcopen(dev, flag, mode, p) tp->t_state |= TS_CARR_ON; splx(s); - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error == 0 && setuptimeout) pdctimeout(sc); @@ -243,7 +243,7 @@ pdcclose(dev, flag, mode, p) tp = sc->sc_tty; timeout_del(&sc->sc_to); - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return 0; } diff --git a/sys/arch/luna88k/dev/siotty.c b/sys/arch/luna88k/dev/siotty.c index c3d552d7059..15f7185fdb6 100644 --- a/sys/arch/luna88k/dev/siotty.c +++ b/sys/arch/luna88k/dev/siotty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siotty.c,v 1.10 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: siotty.c,v 1.11 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: siotty.c,v 1.9 2002/03/17 19:40:43 atatat Exp $ */ /*- @@ -400,7 +400,7 @@ sioopen(dev, flag, mode, p) /* return (*tp->t_linesw->l_open)(dev, tp); */ - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } int @@ -416,7 +416,7 @@ sioclose(dev, flag, mode, p) /* (*tp->t_linesw->l_close)(tp, flag); */ - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); siomctl(sc, TIOCM_BREAK, DMBIC); diff --git a/sys/arch/mac68k/dev/z8530tty.c b/sys/arch/mac68k/dev/z8530tty.c index 08789011850..da3b4e23007 100644 --- a/sys/arch/mac68k/dev/z8530tty.c +++ b/sys/arch/mac68k/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.21 2009/11/09 17:53:38 nicm Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.22 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.14 1996/12/17 20:42:43 gwr Exp $ */ /* @@ -443,7 +443,7 @@ zsopen(dev, flags, mode, p) splx(s); if (error == 0) - error = linesw[tp->t_line].l_open(dev, tp); + error = linesw[tp->t_line].l_open(dev, tp, p); return (error); } @@ -470,7 +470,7 @@ zsclose(dev, flags, mode, p) if ((tp->t_state & TS_ISOPEN) == 0) return 0; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); /* Disable interrupts. */ s = splzs(); diff --git a/sys/arch/macppc/dev/z8530tty.c b/sys/arch/macppc/dev/z8530tty.c index 8df796549c0..987e8c412ef 100644 --- a/sys/arch/macppc/dev/z8530tty.c +++ b/sys/arch/macppc/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.11 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.12 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /*- @@ -602,7 +602,7 @@ zsopen(dev_t dev, int flags, int mode, struct proc *p) splx(s); - error = ((*linesw[tp->t_line].l_open)(dev, tp)); + error = ((*linesw[tp->t_line].l_open)(dev, tp, p)); if (error) goto bad; @@ -638,7 +638,7 @@ zsclose(dev_t dev, int flags, int mode, struct proc *p) if (!ISSET(tp->t_state, TS_ISOPEN)) return 0; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); ttyclose(tp); if (!ISSET(tp->t_state, TS_ISOPEN)) { diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c index 35119d47c6d..a0450e172de 100644 --- a/sys/arch/mvme68k/dev/cl.c +++ b/sys/arch/mvme68k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.50 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: cl.c,v 1.51 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -671,7 +671,7 @@ if (channel == 2) { /* test one channel now */ #ifdef DEBUG cl_dumpport(channel); #endif - return((*linesw[tp->t_line].l_open)(dev, tp)); + return((*linesw[tp->t_line].l_open)(dev, tp, p)); } int clparam(tp, t) struct tty *tp; @@ -759,7 +759,7 @@ clclose(dev, flag, mode, p) channel = CL_CHANNEL(dev); cl = &sc->sc_cl[channel]; tp = cl->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = splcl(); diff --git a/sys/arch/mvme68k/dev/dart.c b/sys/arch/mvme68k/dev/dart.c index a2d37e8b3c7..425a39d2586 100644 --- a/sys/arch/mvme68k/dev/dart.c +++ b/sys/arch/mvme68k/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.5 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: dart.c,v 1.6 2010/04/12 12:57:52 tedu Exp $ */ /* * Mach Operating System @@ -665,7 +665,7 @@ dartopen(dev_t dev, int flag, int mode, struct proc *p) */ tp->t_dev = dev; splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -682,7 +682,7 @@ dartclose(dev_t dev, int flag, int mode, struct proc *p) dart = &sc->sc_dart[port]; tp = dart->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); diff --git a/sys/arch/mvme68k/dev/wl.c b/sys/arch/mvme68k/dev/wl.c index f350d99728d..4f5e8303e60 100644 --- a/sys/arch/mvme68k/dev/wl.c +++ b/sys/arch/mvme68k/dev/wl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wl.c,v 1.21 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: wl.c,v 1.22 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -569,7 +569,7 @@ wlopen(dev, flag, mode, p) * use of the tty with a dialin open waiting. */ tp->t_dev = dev; - return((*linesw[tp->t_line].l_open)(dev, tp)); + return((*linesw[tp->t_line].l_open)(dev, tp, p)); } int clparam(tp, t) @@ -656,7 +656,7 @@ wlclose(dev, flag, mode, p) channel = CL_CHANNEL(dev); cl = &sc->sc_cl[channel]; tp = cl->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = splcl(); diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index 14d8fa9007a..9c23b1b634c 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.30 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: zs.c,v 1.31 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2000 Steve Murphree, Jr. @@ -368,7 +368,7 @@ zsopen(dev, flag, mode, p) } else if (tp->t_state & TS_XCLUDE && suser(p, 0) != 0) return (EBUSY); - error = ((*linesw[tp->t_line].l_open) (dev, tp)); + error = ((*linesw[tp->t_line].l_open) (dev, tp, p)); if (error == 0) ++zp->nzs_open; @@ -392,7 +392,7 @@ zsclose(dev, flag, mode, p) zp = &sc->sc_zs[zsside(dev)]; tp = zp->tty; - (*linesw[tp->t_line].l_close) (tp, flag); + (*linesw[tp->t_line].l_close) (tp, flag, p); s = splzs(); if ((zp->flags & ZS_CONSOLE) == 0 && (tp->t_cflag & HUPCL) != 0) ZBIC(&zp->scc, 5, 0x82); /* drop DTR, RTS */ diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c index fddf67860db..a759c06ecdd 100644 --- a/sys/arch/mvme88k/dev/cl.c +++ b/sys/arch/mvme88k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.57 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: cl.c,v 1.58 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -614,7 +614,7 @@ clopen(dev, flag, mode, p) #ifdef DEBUG cl_dumpport(sc, channel); #endif - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } int @@ -710,7 +710,7 @@ clclose(dev, flag, mode, p) iot = sc->sc_iot; ioh = sc->sc_ioh; tp = cl->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = splcl(); bus_space_write_1(iot, ioh, CL_CAR, channel); diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c index 0fa9d848cfc..0ecedf33613 100644 --- a/sys/arch/mvme88k/dev/dart.c +++ b/sys/arch/mvme88k/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.54 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: dart.c,v 1.55 2010/04/12 12:57:52 tedu Exp $ */ /* * Mach Operating System @@ -675,7 +675,7 @@ dartopen(dev_t dev, int flag, int mode, struct proc *p) */ tp->t_dev = dev; splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -691,7 +691,7 @@ dartclose(dev_t dev, int flag, int mode, struct proc *p) dart = &sc->sc_dart[port]; tp = dart->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c index b63546b3697..5ff188bc045 100644 --- a/sys/arch/mvme88k/dev/vx.c +++ b/sys/arch/mvme88k/dev/vx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vx.c,v 1.40 2009/10/31 12:00:07 fgsch Exp $ */ +/* $OpenBSD: vx.c,v 1.41 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -475,7 +475,7 @@ vxopen(dev_t dev, int flag, int mode, struct proc *p) tp->t_dev = dev; vxt->open = 1; splx(s); - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } int @@ -522,7 +522,7 @@ vxclose(dev_t dev, int flag, int mode, struct proc *p) #endif tp = vxt->tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = splvx(); diff --git a/sys/arch/mvmeppc/dev/bugtty.c b/sys/arch/mvmeppc/dev/bugtty.c index 2a6c5ffc7b1..fb2b3022628 100644 --- a/sys/arch/mvmeppc/dev/bugtty.c +++ b/sys/arch/mvmeppc/dev/bugtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugtty.c,v 1.12 2009/10/31 12:00:07 fgsch Exp $ */ +/* $OpenBSD: bugtty.c,v 1.13 2010/04/12 12:57:52 tedu Exp $ */ /* Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -226,7 +226,7 @@ bugttyopen(dev, flag, mode, p) * use of the tty with a dialin open waiting. */ tp->t_dev = dev; - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -268,7 +268,7 @@ bugttyclose(dev, flag, mode, p) int unit = BUGTTYUNIT(dev); struct tty *tp = bugtty_tty[unit]; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); #if 0 diff --git a/sys/arch/sh/dev/scif.c b/sys/arch/sh/dev/scif.c index 12d13971470..c4bf2fdd4d2 100644 --- a/sys/arch/sh/dev/scif.c +++ b/sys/arch/sh/dev/scif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scif.c,v 1.10 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: scif.c,v 1.11 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: scif.c,v 1.47 2006/07/23 22:06:06 ad Exp $ */ /*- @@ -771,7 +771,7 @@ scifopen(dev_t dev, int flag, int mode, struct proc *p) if (error) goto bad; - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error) goto bad; @@ -792,7 +792,7 @@ scifclose(dev_t dev, int flag, int mode, struct proc *p) if (!ISSET(tp->t_state, TS_ISOPEN)) return (0); - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c index 1390ed82200..38413d86e58 100644 --- a/sys/arch/sparc/dev/magma.c +++ b/sys/arch/sparc/dev/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.24 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: magma.c,v 1.25 2010/04/12 12:57:52 tedu Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -978,7 +978,7 @@ mttyopen(dev, flags, mode, p) splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } /* @@ -996,7 +996,7 @@ mttyclose(dev, flag, mode, p) struct tty *tp = mp->mp_tty; int s; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); /* diff --git a/sys/arch/sparc/dev/spif.c b/sys/arch/sparc/dev/spif.c index c045e404d83..ab6cca4aa9f 100644 --- a/sys/arch/sparc/dev/spif.c +++ b/sys/arch/sparc/dev/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.24 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: spif.c,v 1.25 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -345,7 +345,7 @@ sttyopen(dev, flags, mode, p) splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -362,7 +362,7 @@ sttyclose(dev, flags, mode, p) int port = SPIF_PORT(dev); int s; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); s = spltty(); if (ISSET(tp->t_cflag, HUPCL) || !ISSET(tp->t_state, TS_ISOPEN)) { diff --git a/sys/arch/sparc/dev/z8530tty.c b/sys/arch/sparc/dev/z8530tty.c index 359209f0af0..1ee386b33ae 100644 --- a/sys/arch/sparc/dev/z8530tty.c +++ b/sys/arch/sparc/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.14 2010/03/03 20:13:32 miod Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.15 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /*- @@ -678,7 +678,7 @@ zsopen(dev, flags, mode, p) splx(s); if (error == 0) - error = ((*linesw[tp->t_line].l_open)(dev, tp)); + error = ((*linesw[tp->t_line].l_open)(dev, tp, p)); if (error) goto bad; @@ -719,7 +719,7 @@ zsclose(dev, flags, mode, p) if (!ISSET(tp->t_state, TS_ISOPEN)) return 0; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); s = spltty(); cs->cs_cua = 0; diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c index 954b7833d1d..3c63bfe1814 100644 --- a/sys/arch/sparc64/dev/pcons.c +++ b/sys/arch/sparc64/dev/pcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcons.c,v 1.16 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: pcons.c,v 1.17 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */ /*- @@ -250,7 +250,7 @@ pconsopen(dev, flag, mode, p) timeout_add(&sc->sc_poll_to, 1); } - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } int @@ -264,7 +264,7 @@ pconsclose(dev, flag, mode, p) timeout_del(&sc->sc_poll_to); sc->of_flags &= ~OFPOLL; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return 0; } diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c index 0c26fb2da42..55586f3dff7 100644 --- a/sys/arch/sparc64/dev/sab.c +++ b/sys/arch/sparc64/dev/sab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sab.c,v 1.27 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: sab.c,v 1.28 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -725,7 +725,7 @@ sabttyopen(dev, flags, mode, p) splx(s); - s = (*linesw[tp->t_line].l_open)(dev, tp); + s = (*linesw[tp->t_line].l_open)(dev, tp, p); if (s != 0) { if (tp->t_state & TS_ISOPEN) return (s); @@ -755,7 +755,7 @@ sabttyclose(dev, flags, mode, p) struct tty *tp = sc->sc_tty; int s; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); s = spltty(); diff --git a/sys/arch/sparc64/dev/sbbc.c b/sys/arch/sparc64/dev/sbbc.c index ef0f070a57b..e10555e3ab5 100644 --- a/sys/arch/sparc64/dev/sbbc.c +++ b/sys/arch/sparc64/dev/sbbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbbc.c,v 1.7 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: sbbc.c,v 1.8 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -532,7 +532,7 @@ sbbcopen(dev_t dev, int flag, int mode, struct proc *p) return (EBUSY); tp->t_state |= TS_CARR_ON; - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -549,7 +549,7 @@ sbbcclose(dev_t dev, int flag, int mode, struct proc *p) return (ENXIO); tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); } diff --git a/sys/arch/sparc64/dev/vcctty.c b/sys/arch/sparc64/dev/vcctty.c index f43c66f436d..b8177d9e159 100644 --- a/sys/arch/sparc64/dev/vcctty.c +++ b/sys/arch/sparc64/dev/vcctty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vcctty.c,v 1.3 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: vcctty.c,v 1.4 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -328,7 +328,7 @@ vccttyopen(dev_t dev, int flag, int mode, struct proc *p) return (EBUSY); tp->t_state |= TS_CARR_ON; - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -345,7 +345,7 @@ vccttyclose(dev_t dev, int flag, int mode, struct proc *p) return (ENXIO); tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); } diff --git a/sys/arch/sparc64/dev/vcons.c b/sys/arch/sparc64/dev/vcons.c index f6fefcfd89d..e17bce33fb3 100644 --- a/sys/arch/sparc64/dev/vcons.c +++ b/sys/arch/sparc64/dev/vcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vcons.c,v 1.7 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: vcons.c,v 1.8 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -183,7 +183,7 @@ vconsopen(dev_t dev, int flag, int mode, struct proc *p) return (EBUSY); tp->t_state |= TS_CARR_ON; - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -200,7 +200,7 @@ vconsclose(dev_t dev, int flag, int mode, struct proc *p) return (ENXIO); tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); } diff --git a/sys/arch/sparc64/dev/z8530tty.c b/sys/arch/sparc64/dev/z8530tty.c index c4119575ce7..dfa79ac9a47 100644 --- a/sys/arch/sparc64/dev/z8530tty.c +++ b/sys/arch/sparc64/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.19 2010/03/03 20:13:34 miod Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.20 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -666,7 +666,7 @@ zsopen(dev, flags, mode, p) splx(s); if (error == 0) - error = ((*linesw[tp->t_line].l_open)(dev, tp)); + error = ((*linesw[tp->t_line].l_open)(dev, tp, p)); if (error) goto bad; @@ -703,7 +703,7 @@ zsclose(dev, flags, mode, p) if (!ISSET(tp->t_state, TS_ISOPEN)) return 0; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); s = spltty(); cs->cs_cua = 0; diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c index 378c1a7f757..c95d6c3acbc 100644 --- a/sys/arch/vax/qbus/dhu.c +++ b/sys/arch/vax/qbus/dhu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhu.c,v 1.15 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: dhu.c,v 1.16 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */ /* * Copyright (c) 2003, Hugh Graham. @@ -455,7 +455,7 @@ dhuopen(dev, flag, mode, p) splx(s); if (error) return (error); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } /*ARGSUSED*/ @@ -476,7 +476,7 @@ dhuclose(dev, flag, mode, p) tp = sc->sc_dhu[line].dhu_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); /* Make sure a BREAK state is not left enabled. */ diff --git a/sys/arch/vax/qbus/dl.c b/sys/arch/vax/qbus/dl.c index 7a863891222..b0e07c19fe3 100644 --- a/sys/arch/vax/qbus/dl.c +++ b/sys/arch/vax/qbus/dl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dl.c,v 1.9 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: dl.c,v 1.10 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: dl.c,v 1.11 2000/01/24 02:40:29 matt Exp $ */ /*- @@ -312,7 +312,7 @@ dlopen(dev, flag, mode, p) } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0) != 0) return EBUSY; - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } /*ARGSUSED*/ @@ -330,7 +330,7 @@ dlclose(dev, flag, mode, p) sc = dl_cd.cd_devs[unit]; tp = sc->sc_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); /* Make sure a BREAK state is not left enabled. */ dlbrk(sc, 0); diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c index ff604e6d7f3..6d08ed1b5b5 100644 --- a/sys/arch/vax/qbus/dz.c +++ b/sys/arch/vax/qbus/dz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz.c,v 1.20 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: dz.c,v 1.21 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -316,7 +316,7 @@ dzopen(dev_t dev, int flag, int mode, struct proc *p) splx(s); if (error) return (error); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } /*ARGSUSED*/ @@ -334,7 +334,7 @@ dzclose(dev_t dev, int flag, int mode, struct proc *p) tp = sc->sc_dz[line].dz_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); /* Make sure a BREAK state is not left enabled. */ (void) dzmctl(sc, line, DML_BRK, DMBIC); diff --git a/sys/arch/vax/qbus/qd.c b/sys/arch/vax/qbus/qd.c index 77f05952695..ea77385df4b 100644 --- a/sys/arch/vax/qbus/qd.c +++ b/sys/arch/vax/qbus/qd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qd.c,v 1.16 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: qd.c,v 1.17 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: qd.c,v 1.17 2000/01/24 02:40:29 matt Exp $ */ /*- @@ -857,7 +857,7 @@ qdopen(dev, flag, mode, p) * enable intrpts, open line discipline */ dga->csr |= GLOBAL_IE; /* turn on the interrupts */ - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } dga->csr |= GLOBAL_IE; /* turn on the interrupts */ return(0); @@ -1046,7 +1046,7 @@ qdclose(dev, flag, mode, p) * this is the console */ tp = qd_tty[minor_dev]; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); tp->t_state = 0; qdflags[unit].inuse &= ~CONS_DEV; diff --git a/sys/arch/vax/uba/qv.c b/sys/arch/vax/uba/qv.c index 4ae41721a87..a70bc1345e1 100644 --- a/sys/arch/vax/uba/qv.c +++ b/sys/arch/vax/uba/qv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qv.c,v 1.13 2007/09/15 14:28:17 krw Exp $ */ +/* $OpenBSD: qv.c,v 1.14 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: qv.c,v 1.2 1996/09/02 06:44:28 mycroft Exp $ */ /*- @@ -406,7 +406,7 @@ qvopen(dev, flag) * mouse channel. For the mouse we init the ring ptr's. */ if( QVCHAN(unit) != QVMOUSECHAN ) - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); else { mouseon = 1; /* set up event queue for later */ @@ -447,7 +447,7 @@ qvclose(dev, flag, mode, p) * otherwise clear the state flag, and put the keyboard into down/up. */ if (QVCHAN(unit) != QVMOUSECHAN) { - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); error = ttyclose(tp); } else { mouseon = 0; diff --git a/sys/arch/vax/vax/gencons.c b/sys/arch/vax/vax/gencons.c index d60fbd6f45e..ae085b62f87 100644 --- a/sys/arch/vax/vax/gencons.c +++ b/sys/arch/vax/vax/gencons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gencons.c,v 1.21 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: gencons.c,v 1.22 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: gencons.c,v 1.22 2000/01/24 02:40:33 matt Exp $ */ /* @@ -110,7 +110,7 @@ gencnopen(dev, flag, mode, p) mtpr(GC_RIE, pr_rxcs[unit]); /* Turn on interrupts */ mtpr(GC_TIE, pr_txcs[unit]); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -123,7 +123,7 @@ gencnclose(dev, flag, mode, p) if (minor(dev) == 0) consopened = 0; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); } diff --git a/sys/arch/vax/vxt/qsc.c b/sys/arch/vax/vxt/qsc.c index 491eb43fc17..274a4c57375 100644 --- a/sys/arch/vax/vxt/qsc.c +++ b/sys/arch/vax/vxt/qsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qsc.c,v 1.5 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: qsc.c,v 1.6 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -613,7 +613,7 @@ qscopen(dev_t dev, int flag, int mode, struct proc *p) */ tp->t_dev = dev; splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -627,7 +627,7 @@ qscclose(dev_t dev, int flag, int mode, struct proc *p) sc = (struct qscsoftc *)qsc_cd.cd_devs[0]; tp = sc->sc_tty[line]; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); return (0); diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index fb06e1360a0..ab41d22e286 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.137 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: com.c,v 1.138 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -466,7 +466,7 @@ comopen(dev_t dev, int flag, int mode, struct proc *p) } splx(s); - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } int @@ -488,7 +488,7 @@ comclose(dev_t dev, int flag, int mode, struct proc *p) if(sc->sc_swflags & COM_SW_DEAD) return 0; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); if (ISSET(tp->t_state, TS_WOPEN)) { /* tty device is waiting for carrier; drop dtr then re-raise */ diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index bcf7f43023b..e076b8f2dfc 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.28 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: cy.c,v 1.29 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1996 Timo Rossi. * All rights reserved. @@ -400,7 +400,7 @@ cyopen(dev, flag, mode, p) splx(s); - return (*linesw[tp->t_line].l_open)(dev, tp); + return (*linesw[tp->t_line].l_open)(dev, tp, p); } /* @@ -424,7 +424,7 @@ cyclose(dev, flag, mode, p) port, flag, mode); #endif - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); if (ISSET(tp->t_cflag, HUPCL) && diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c index f8c9f388b51..2206573686d 100644 --- a/sys/dev/ic/z8530tty.c +++ b/sys/dev/ic/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.20 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.21 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /* @@ -416,7 +416,7 @@ zsopen(dev, flags, mode, p) splx(s); if (error == 0) - error = linesw[tp->t_line].l_open(dev, tp); + error = linesw[tp->t_line].l_open(dev, tp, p); return (error); } @@ -444,7 +444,7 @@ zsclose(dev, flags, mode, p) if ((tp->t_state & TS_ISOPEN) == 0) return 0; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); hup = tp->t_cflag & HUPCL; if (zst->zst_swflags & TIOCFLAG_SOFTCAR) hup = 0; diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index 0f1377f3e7d..6ba9554e252 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.15 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: cz.c,v 1.16 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -1041,7 +1041,7 @@ czttyopen(dev_t dev, int flags, int mode, struct proc *p) if (error) goto bad; - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); if (error) goto bad; @@ -1074,7 +1074,7 @@ czttyclose(dev_t dev, int flags, int mode, struct proc *p) if (!ISSET(tp->t_state, TS_ISOPEN)) return (0); - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); ttyclose(tp); if (!ISSET(tp->t_state, TS_ISOPEN)) { diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 8a3a6ba7978..87d831c5f6d 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.20 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: magma.c,v 1.21 2010/04/12 12:57:52 tedu Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -915,7 +915,7 @@ mttyopen(dev_t dev, int flags, int mode, struct proc *p) splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } /* @@ -929,7 +929,7 @@ mttyclose(dev_t dev, int flag, int mode, struct proc *p) struct tty *tp = mp->mp_tty; int s; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); s = spltty(); /* if HUPCL is set, and the tty is no longer open diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c index df189627d1d..db6c09075a5 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.16 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: spif.c,v 1.17 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -414,7 +414,7 @@ sttyopen(dev, flags, mode, p) splx(s); - return ((*linesw[tp->t_line].l_open)(dev, tp)); + return ((*linesw[tp->t_line].l_open)(dev, tp, p)); } int @@ -431,7 +431,7 @@ sttyclose(dev, flags, mode, p) int port = SPIF_PORT(dev); int s; - (*linesw[tp->t_line].l_close)(tp, flags); + (*linesw[tp->t_line].l_close)(tp, flags, p); s = spltty(); if (ISSET(tp->t_cflag, HUPCL) || !ISSET(tp->t_state, TS_ISOPEN)) { diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index f073c97b661..ead332cd742 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.46 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: ucom.c,v 1.47 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -503,11 +503,11 @@ ucomopen(dev_t dev, int flag, int mode, struct proc *p) } splx(s); - error = ttyopen(UCOMUNIT(dev), tp); + error = ttyopen(UCOMUNIT(dev), tp, p); if (error) goto bad; - error = (*LINESW(tp, l_open))(dev, tp); + error = (*LINESW(tp, l_open))(dev, tp, p); if (error) goto bad; @@ -554,7 +554,7 @@ ucomclose(dev_t dev, int flag, int mode, struct proc *p) DPRINTF(("ucomclose: unit=%d\n", UCOMUNIT(dev))); ucom_lock(sc); - (*LINESW(tp, l_close))(tp, flag); + (*LINESW(tp, l_close))(tp, flag, p); s = spltty(); CLR(tp->t_state, TS_BUSY | TS_FLUSH); sc->sc_cua = 0; diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index 70153570124..62663eea3e9 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.98 2010/03/30 17:40:55 oga Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.99 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -857,7 +857,7 @@ wsdisplayopen(dev_t dev, int flag, int mode, struct proc *p) return (EBUSY); tp->t_state |= TS_CARR_ON; - error = ((*linesw[tp->t_line].l_open)(dev, tp)); + error = ((*linesw[tp->t_line].l_open)(dev, tp, p)); if (error) return (error); @@ -900,7 +900,7 @@ wsdisplayclose(dev_t dev, int flag, int mode, struct proc *p) splx(s); } tp = scr->scr_tty; - (*linesw[tp->t_line].l_close)(tp, flag); + (*linesw[tp->t_line].l_close)(tp, flag, p); ttyclose(tp); } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index d6428906e19..9250b7ac59d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.84 2009/11/27 09:18:01 sobrado Exp $ */ +/* $OpenBSD: tty.c,v 1.85 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -172,7 +172,7 @@ int64_t tk_cancc, tk_nin, tk_nout, tk_rawcc; * Initial open of tty, or (re)entry to standard tty line discipline. */ int -ttyopen(dev_t device, struct tty *tp) +ttyopen(dev_t device, struct tty *tp, struct proc *p) { int s; @@ -945,10 +945,10 @@ ttioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p) return (ENXIO); if (t != tp->t_line) { s = spltty(); - (*linesw[tp->t_line].l_close)(tp, flag); - error = (*linesw[t].l_open)(device, tp); + (*linesw[tp->t_line].l_close)(tp, flag, p); + error = (*linesw[t].l_open)(device, tp, p); if (error) { - (void)(*linesw[tp->t_line].l_open)(device, tp); + (*linesw[tp->t_line].l_open)(device, tp, p); splx(s); return (error); } @@ -1325,7 +1325,7 @@ ttstart(struct tty *tp) * "close" a line discipline */ int -ttylclose(struct tty *tp, int flag) +ttylclose(struct tty *tp, int flag, struct proc *p) { if (flag & FNONBLOCK) diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index 22b1e36dfe9..10140fa4aaa 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_conf.c,v 1.14 2009/08/25 16:16:34 jsg Exp $ */ +/* $OpenBSD: tty_conf.c,v 1.15 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: tty_conf.c,v 1.18 1996/05/19 17:17:55 jonathan Exp $ */ /*- @@ -44,8 +44,8 @@ #include <sys/tty.h> #include <sys/conf.h> -#define ttynodisc ((int (*)(dev_t, struct tty *))enodev) -#define ttyerrclose ((int (*)(struct tty *, int flags))enodev) +#define ttynodisc ((int (*)(dev_t, struct tty *, struct proc *))enodev) +#define ttyerrclose ((int (*)(struct tty *, int flags, struct proc *))enodev) #define ttyerrio ((int (*)(struct tty *, struct uio *, int))enodev) #define ttyerrinput ((int (*)(int c, struct tty *))enodev) #define ttyerrstart ((int (*)(struct tty *))enodev) @@ -54,8 +54,8 @@ int nullioctl(struct tty *, u_long, caddr_t, int, struct proc *); #include "sl.h" #if NSL > 0 -int slopen(dev_t dev, struct tty *tp); -int slclose(struct tty *tp, int flags); +int slopen(dev_t dev, struct tty *tp, struct proc *); +int slclose(struct tty *tp, int flags, struct proc *); int sltioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p); int slinput(int c, struct tty *tp); @@ -64,8 +64,8 @@ int slstart(struct tty *tp); #include "ppp.h" #if NPPP > 0 -int pppopen(dev_t dev, struct tty *tp); -int pppclose(struct tty *tp, int flags); +int pppopen(dev_t dev, struct tty *tp, struct proc *); +int pppclose(struct tty *tp, int flags, struct proc *); int ppptioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct proc *p); int pppinput(int c, struct tty *tp); @@ -76,22 +76,22 @@ int pppwrite(struct tty *tp, struct uio *uio, int flag); #include "nmea.h" #if NNMEA > 0 -int nmeaopen(dev_t, struct tty *); -int nmeaclose(struct tty *, int); +int nmeaopen(dev_t, struct tty *, struct proc *); +int nmeaclose(struct tty *, int, struct proc *); int nmeainput(int, struct tty *); #endif #include "msts.h" #if NMSTS > 0 -int mstsopen(dev_t, struct tty *); -int mstsclose(struct tty *, int); +int mstsopen(dev_t, struct tty *, struct proc *); +int mstsclose(struct tty *, int, struct proc *); int mstsinput(int, struct tty *); #endif #include "endrun.h" #if NENDRUN > 0 -int endrunopen(dev_t, struct tty *); -int endrunclose(struct tty *, int); +int endrunopen(dev_t, struct tty *, struct proc *); +int endrunclose(struct tty *, int, struct proc *); int endruninput(int, struct tty *); #endif diff --git a/sys/kern/tty_endrun.c b/sys/kern/tty_endrun.c index d60cdcc9899..9cba2d53550 100644 --- a/sys/kern/tty_endrun.c +++ b/sys/kern/tty_endrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_endrun.c,v 1.2 2009/06/02 21:17:35 ckuethe Exp $ */ +/* $OpenBSD: tty_endrun.c,v 1.3 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -66,8 +66,8 @@ int endrundebug = 0; #endif #define DPRINTF(x) DPRINTFN(0, x) -int endrunopen(dev_t, struct tty *); -int endrunclose(struct tty *, int); +int endrunopen(dev_t, struct tty *, struct proc *p); +int endrunclose(struct tty *, int, struct proc *p); int endruninput(int, struct tty *); void endrunattach(int); @@ -120,9 +120,8 @@ endrunattach(int dummy) } int -endrunopen(dev_t dev, struct tty *tp) +endrunopen(dev_t dev, struct tty *tp, struct proc *p) { - struct proc *p = curproc; struct endrun *np; int error; @@ -154,7 +153,7 @@ endrunopen(dev_t dev, struct tty *tp) #endif tp->t_sc = (caddr_t)np; - error = linesw[TTYDISC].l_open(dev, tp); + error = linesw[TTYDISC].l_open(dev, tp, p); if (error) { free(np, M_DEVBUF); tp->t_sc = NULL; @@ -167,7 +166,7 @@ endrunopen(dev_t dev, struct tty *tp) } int -endrunclose(struct tty *tp, int flags) +endrunclose(struct tty *tp, int flags, struct proc *p) { struct endrun *np = (struct endrun *)tp->t_sc; @@ -180,7 +179,7 @@ endrunclose(struct tty *tp, int flags) endrun_count--; if (endrun_count == 0) endrun_nxid = 0; - return linesw[TTYDISC].l_close(tp, flags); + return linesw[TTYDISC].l_close(tp, flags, p); } /* collect EndRun sentence from tty */ diff --git a/sys/kern/tty_msts.c b/sys/kern/tty_msts.c index 90495b6b55d..00b2566572c 100644 --- a/sys/kern/tty_msts.c +++ b/sys/kern/tty_msts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_msts.c,v 1.15 2009/06/02 21:17:35 ckuethe Exp $ */ +/* $OpenBSD: tty_msts.c,v 1.16 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -38,8 +38,8 @@ int mstsdebug = 0; #endif #define DPRINTF(x) DPRINTFN(0, x) -int mstsopen(dev_t, struct tty *); -int mstsclose(struct tty *, int); +int mstsopen(dev_t, struct tty *, struct proc *); +int mstsclose(struct tty *, int, struct proc *); int mstsinput(int, struct tty *); void mstsattach(int); @@ -85,9 +85,8 @@ mstsattach(int dummy) } int -mstsopen(dev_t dev, struct tty *tp) +mstsopen(dev_t dev, struct tty *tp, struct proc *p) { - struct proc *p = curproc; struct msts *np; int error; @@ -116,7 +115,7 @@ mstsopen(dev_t dev, struct tty *tp) np->sync = 1; tp->t_sc = (caddr_t)np; - error = linesw[TTYDISC].l_open(dev, tp); + error = linesw[TTYDISC].l_open(dev, tp, p); if (error) { free(np, M_DEVBUF); tp->t_sc = NULL; @@ -129,7 +128,7 @@ mstsopen(dev_t dev, struct tty *tp) } int -mstsclose(struct tty *tp, int flags) +mstsclose(struct tty *tp, int flags, struct proc *p) { struct msts *np = (struct msts *)tp->t_sc; @@ -141,7 +140,7 @@ mstsclose(struct tty *tp, int flags) msts_count--; if (msts_count == 0) msts_nxid = 0; - return linesw[TTYDISC].l_close(tp, flags); + return linesw[TTYDISC].l_close(tp, flags, p); } /* collect MSTS sentence from tty */ diff --git a/sys/kern/tty_nmea.c b/sys/kern/tty_nmea.c index 4fe88347f5b..d8cb554023a 100644 --- a/sys/kern/tty_nmea.c +++ b/sys/kern/tty_nmea.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_nmea.c,v 1.35 2009/06/02 21:17:35 ckuethe Exp $ */ +/* $OpenBSD: tty_nmea.c,v 1.36 2010/04/12 12:57:52 tedu Exp $ */ /* * Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org> @@ -35,8 +35,8 @@ int nmeadebug = 0; #endif #define DPRINTF(x) DPRINTFN(0, x) -int nmeaopen(dev_t, struct tty *); -int nmeaclose(struct tty *, int); +int nmeaopen(dev_t, struct tty *, struct proc *); +int nmeaclose(struct tty *, int, struct proc *); int nmeainput(int, struct tty *); void nmeaattach(int); @@ -91,9 +91,8 @@ nmeaattach(int dummy) } int -nmeaopen(dev_t dev, struct tty *tp) +nmeaopen(dev_t dev, struct tty *tp, struct proc *p) { - struct proc *p = curproc; struct nmea *np; int error; @@ -118,7 +117,7 @@ nmeaopen(dev_t dev, struct tty *tp) np->sync = 1; tp->t_sc = (caddr_t)np; - error = linesw[TTYDISC].l_open(dev, tp); + error = linesw[TTYDISC].l_open(dev, tp, p); if (error) { free(np, M_DEVBUF); tp->t_sc = NULL; @@ -130,7 +129,7 @@ nmeaopen(dev_t dev, struct tty *tp) } int -nmeaclose(struct tty *tp, int flags) +nmeaclose(struct tty *tp, int flags, struct proc *p) { struct nmea *np = (struct nmea *)tp->t_sc; @@ -142,7 +141,7 @@ nmeaclose(struct tty *tp, int flags) nmea_count--; if (nmea_count == 0) nmea_nxid = 0; - return linesw[TTYDISC].l_close(tp, flags); + return linesw[TTYDISC].l_close(tp, flags, p); } /* Collect NMEA sentences from the tty. */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index cac1312b111..9833b619580 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.44 2010/04/02 20:20:23 nicm Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.45 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -265,7 +265,7 @@ ptsopen(dev_t dev, int flag, int devtype, struct proc *p) if (error) return (error); } - error = (*linesw[tp->t_line].l_open)(dev, tp); + error = (*linesw[tp->t_line].l_open)(dev, tp, p); ptcwakeup(tp, FREAD|FWRITE); return (error); } @@ -277,7 +277,7 @@ ptsclose(dev_t dev, int flag, int mode, struct proc *p) struct tty *tp = pti->pt_tty; int error; - error = (*linesw[tp->t_line].l_close)(tp, flag); + error = (*linesw[tp->t_line].l_close)(tp, flag, p); error |= ttyclose(tp); ptcwakeup(tp, FREAD|FWRITE); return (error); diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 164c3570f58..096b04cfe7f 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.95 2009/11/01 20:14:12 nicm Exp $ */ +/* $OpenBSD: conf.h,v 1.96 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -532,8 +532,8 @@ void randomattach(void); * Line discipline switch table */ struct linesw { - int (*l_open)(dev_t dev, struct tty *tp); - int (*l_close)(struct tty *tp, int flags); + int (*l_open)(dev_t dev, struct tty *tp, struct proc *p); + int (*l_close)(struct tty *tp, int flags, struct proc *p); int (*l_read)(struct tty *tp, struct uio *uio, int flag); int (*l_write)(struct tty *tp, struct uio *uio, diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 704c2e7ec56..1e048b65617 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.h,v 1.23 2009/07/19 08:16:06 blambert Exp $ */ +/* $OpenBSD: tty.h,v 1.24 2010/04/12 12:57:52 tedu Exp $ */ /* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */ /*- @@ -281,9 +281,9 @@ int ttyclose(struct tty *tp); void ttyflush(struct tty *tp, int rw); void ttyinfo(struct tty *tp); int ttyinput(int c, struct tty *tp); -int ttylclose(struct tty *tp, int flag); +int ttylclose(struct tty *tp, int flag, struct proc *p); int ttymodem(struct tty *tp, int flag); -int ttyopen(dev_t device, struct tty *tp); +int ttyopen(dev_t device, struct tty *tp, struct proc *p); int ttyoutput(int c, struct tty *tp); void ttypend(struct tty *tp); void ttyretype(struct tty *tp); |