aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/tty_pty.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
commitdc08ffec870569914f44bcf26aa838310e343764 (patch)
tree0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/kern/tty_pty.c
parentc33f7bb853b2c9fc395b43274891a8975a675553 (diff)
downloadsrc-dc08ffec870569914f44bcf26aa838310e343764.tar.gz
src-dc08ffec870569914f44bcf26aa838310e343764.zip
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.
Notes
Notes: svn path=/head/; revision=126080
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 ab3ef5dbf1e4..5648e7218836 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 */