diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty_cons.c | 15 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 32 | ||||
-rw-r--r-- | sys/kern/tty_tty.c | 18 |
3 files changed, 37 insertions, 28 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index fceb4dd..1482c61 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.57 1998/03/28 10:32:56 bde Exp $ + * $Id: cons.c,v 1.58 1998/06/07 17:09:58 dfr Exp $ */ #include "opt_devfs.h" @@ -81,11 +81,14 @@ static d_write_t cnwrite; static d_ioctl_t cnioctl; static d_poll_t cnpoll; -#define CDEV_MAJOR 0 -static struct cdevsw cn_cdevsw = - { cnopen, cnclose, cnread, cnwrite, /*0*/ - cnioctl, nullstop, nullreset, nodevtotty,/* console */ - cnpoll, nommap, NULL, "console", NULL, -1 }; +#define CDEV_MAJOR 0 +static struct cdevsw cn_cdevsw = { + cnopen, cnclose, cnread, cnwrite, + cnioctl, nullstop, nullreset, nodevtotty, + cnpoll, nommap, NULL, "console", + NULL, -1, nodump, nopsize, + D_TTY, +}; static dev_t cn_dev_t; /* seems to be never really used */ SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLTYPE_OPAQUE|CTLFLAG_RD, 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. */ diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 409be70..889c935 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tty_tty.c 8.2 (Berkeley) 9/23/93 - * $Id: tty_tty.c,v 1.23 1998/02/20 13:46:56 bde Exp $ + * $Id: tty_tty.c,v 1.24 1998/06/07 17:11:44 dfr Exp $ */ /* @@ -58,13 +58,15 @@ static d_write_t cttywrite; static d_ioctl_t cttyioctl; static d_poll_t cttypoll; -#define CDEV_MAJOR 1 -/* Don't make static, fdesc_vnops uses this. */ -struct cdevsw ctty_cdevsw = - { cttyopen, nullclose, cttyread, cttywrite, /*1*/ - cttyioctl, nullstop, nullreset, nodevtotty,/* tty */ - cttypoll, nommap, NULL, "ctty", NULL, -1 }; - +#define CDEV_MAJOR 1 +/* Don't make this static, since fdesc_vnops uses it. */ +struct cdevsw ctty_cdevsw = { + cttyopen, nullclose, cttyread, cttywrite, + cttyioctl, nullstop, nullreset, nodevtotty, + cttypoll, nommap, NULL, "ctty", + NULL, -1, nodump, nopsize, + D_TTY, +}; #define cttyvp(p) ((p)->p_flag & P_CONTROLT ? (p)->p_session->s_ttyvp : NULL) |