diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
commit | ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6 (patch) | |
tree | e8ccb3ca13f44ca973f728258096d882547e3ad2 /sys/kern/tty_pty.c | |
parent | 2baad6b54ce317c346edf8f37ff0eca38e677146 (diff) | |
download | src-ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6.tar.gz src-ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6.zip |
This patch clears the way for removing a number of tty related
fields in struct cdevsw:
d_stop moved to struct tty.
d_reset already unused.
d_devtotty linkage now provided by dev_t->si_tty.
These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.
The changes in this patch consist of:
initialize dev->si_tty in *_open()
initialize tty->t_stop
remove devtotty functions
rename ttpoll to ttypoll
a few adjustments to these changes in the generic code
a bump of __FreeBSD_version
add a couple of FreeBSD tags
Notes
Notes:
svn path=/head/; revision=51654
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r-- | sys/kern/tty_pty.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 2fe2f5ee9a34..9531f7ba53c8 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -58,6 +58,7 @@ MALLOC_DEFINE(M_PTY, "ptys", "pty data structures"); static void ptsstart __P((struct tty *tp)); +static void ptsstop __P((struct tty *tp, int rw)); static void ptcwakeup __P((struct tty *tp, int flag)); static void ptyinit __P((int n)); @@ -66,8 +67,6 @@ static d_close_t ptsclose; static d_read_t ptsread; static d_write_t ptswrite; static d_ioctl_t ptyioctl; -static d_stop_t ptsstop; -static d_devtotty_t ptydevtotty; static d_open_t ptcopen; static d_close_t ptcclose; static d_read_t ptcread; @@ -81,10 +80,10 @@ static struct cdevsw pts_cdevsw = { /* read */ ptsread, /* write */ ptswrite, /* ioctl */ ptyioctl, - /* stop */ ptsstop, + /* stop */ nostop, /* reset */ noreset, - /* devtotty */ ptydevtotty, - /* poll */ ttpoll, + /* devtotty */ nodevtotty, + /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ "pts", @@ -106,7 +105,7 @@ static struct cdevsw ptc_cdevsw = { /* ioctl */ ptyioctl, /* stop */ nostop, /* reset */ noreset, - /* devtotty */ ptydevtotty, + /* devtotty */ nodevtotty, /* poll */ ptcpoll, /* mmap */ nommap, /* strategy */ nostrategy, @@ -362,6 +361,7 @@ ptcopen(dev, flag, devtype, p) if (tp->t_oproc) return (EIO); tp->t_oproc = ptsstart; + tp->t_stop = ptsstop; (void)(*linesw[tp->t_line].l_modem)(tp, 1); tp->t_lflag &= ~EXTPROC; pti = dev->si_drv1; @@ -647,16 +647,6 @@ block: goto again; } -static struct tty * -ptydevtotty(dev) - dev_t dev; -{ - if (minor(dev) & ~0xff) - return (NULL); - - return dev->si_tty; -} - /*ARGSUSED*/ static int ptyioctl(dev, cmd, data, flag, p) |