summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 2fe2f5e..9531f7b 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)
OpenPOWER on IntegriCloud