diff options
author | bde <bde@FreeBSD.org> | 1998-08-23 08:26:42 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-08-23 08:26:42 +0000 |
commit | 35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c (patch) | |
tree | 89e7eed7449d834bed22fb54542711e65643ac81 /sys/kern/tty_pty.c | |
parent | a86ea80a2987ff6a41fbe0c94f9029e6d2b6af5d (diff) | |
download | FreeBSD-src-35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c.zip FreeBSD-src-35fa8731253a1d4dacf0c2c7d39f2b77cd4bcc0c.tar.gz |
Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().
Cleaned up the cdevswitch initializers for all tty drivers.
Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater()
is now called centrally for opens, not just for parameter changes.
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r-- | sys/kern/tty_pty.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 1f430e2..214f103 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 - * $Id: tty_pty.c,v 1.52 1998/06/07 17:11:43 dfr Exp $ + * $Id: tty_pty.c,v 1.53 1998/07/15 12:18:30 bde Exp $ */ /* @@ -79,18 +79,23 @@ static d_read_t ptcread; static d_write_t ptcwrite; static d_poll_t ptcpoll; -#define CDEV_MAJOR_S 5 -#define CDEV_MAJOR_C 6 -static struct cdevsw pts_cdevsw = - { ptsopen, ptsclose, ptsread, ptswrite, /*5*/ - ptyioctl, ptsstop, nullreset, ptydevtotty,/* ttyp */ - ttpoll, nommap, NULL, "pts", NULL, -1 }; - -static struct cdevsw ptc_cdevsw = - { ptcopen, ptcclose, ptcread, ptcwrite, /*6*/ - ptyioctl, nullstop, nullreset, ptydevtotty,/* ptyp */ - ptcpoll, nommap, NULL, "ptc", NULL, -1 }; - +#define CDEV_MAJOR_S 5 +static struct cdevsw pts_cdevsw = { + ptsopen, ptsclose, ptsread, ptswrite, + ptyioctl, ptsstop, nullreset, ptydevtotty, + ttpoll, nommap, NULL, "pts", + NULL, -1, nodump, nopsize, + D_TTY, +}; + +#define CDEV_MAJOR_C 6 +static struct cdevsw ptc_cdevsw = { + ptcopen, ptcclose, ptcread, ptcwrite, + ptyioctl, nullstop, nullreset, ptydevtotty, + ptcpoll, nommap, NULL, "ptc", + NULL, -1, nodump, nopsize, + D_TTY, +}; #if NPTY == 1 #undef NPTY @@ -178,7 +183,6 @@ ptsopen(dev, flag, devtype, p) tp->t_lflag = TTYDEF_LFLAG; tp->t_cflag = TTYDEF_CFLAG; tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; - ttsetwater(tp); /* would be done in xxparam() */ } else if (tp->t_state&TS_XCLUDE && p->p_ucred->cr_uid != 0) return (EBUSY); if (tp->t_oproc) /* Ctrlr still around. */ |