summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
committerphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
commitad925439e08646e188eb1c0e0be355f0685c8739 (patch)
tree0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/kern/tty_pty.c
parentd68e8ba04cb070f349043edccaafae5facffab48 (diff)
downloadFreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.zip
FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.tar.gz
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Diffstat (limited to 'sys/kern/tty_pty.c')
-rw-r--r--sys/kern/tty_pty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index ab3ef5d..5648e72 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -80,6 +80,7 @@ static d_poll_t ptcpoll;
#define CDEV_MAJOR_S 5
static struct cdevsw pts_cdevsw = {
+ .d_version = D_VERSION,
.d_open = ptsopen,
.d_close = ptsclose,
.d_read = ptsread,
@@ -87,11 +88,12 @@ static struct cdevsw pts_cdevsw = {
.d_ioctl = ptyioctl,
.d_name = "pts",
.d_maj = CDEV_MAJOR_S,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
#define CDEV_MAJOR_C 6
static struct cdevsw ptc_cdevsw = {
+ .d_version = D_VERSION,
.d_open = ptcopen,
.d_close = ptcclose,
.d_read = ptcread,
@@ -100,7 +102,7 @@ static struct cdevsw ptc_cdevsw = {
.d_poll = ptcpoll,
.d_name = "ptc",
.d_maj = CDEV_MAJOR_C,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
#define BUFSIZ 100 /* Chunk size iomoved to/from user */
OpenPOWER on IntegriCloud