summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_conf.c2
-rw-r--r--sys/kern/kern_descrip.c2
-rw-r--r--sys/kern/subr_bus.c2
-rw-r--r--sys/kern/subr_devstat.c2
-rw-r--r--sys/kern/subr_log.c2
-rw-r--r--sys/kern/tty_cons.c3
-rw-r--r--sys/kern/tty_pty.c6
-rw-r--r--sys/kern/tty_tty.c3
8 files changed, 18 insertions, 4 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 19592ad..85f5ba2 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -115,6 +115,8 @@ dead_strategy(struct bio *bp)
#define dead_kqfilter (d_kqfilter_t *)enxio
static struct cdevsw dead_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT, /* XXX: does dead_strategy need this ? */
.d_open = dead_open,
.d_close = dead_close,
.d_read = dead_read,
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index c5e005b..3b53473 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -87,6 +87,8 @@ static d_open_t fdopen;
#define CDEV_MAJOR 22
static struct cdevsw fildesc_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = fdopen,
.d_name = "FD",
.d_maj = CDEV_MAJOR,
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 092f410..4f2f836 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -220,6 +220,8 @@ static d_poll_t devpoll;
#define CDEV_MAJOR 173
static struct cdevsw dev_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = devopen,
.d_close = devclose,
.d_read = devread,
diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c
index f33aeb0..04abe89 100644
--- a/sys/kern/subr_devstat.c
+++ b/sys/kern/subr_devstat.c
@@ -437,6 +437,8 @@ SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD,
static d_mmap_t devstat_mmap;
static struct cdevsw devstat_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_mmap = devstat_mmap,
.d_name = "devstat",
};
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index b2ece2d..48b4d58 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -69,6 +69,8 @@ static void logtimeout(void *arg);
#define CDEV_MAJOR 7
static struct cdevsw log_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = logopen,
.d_close = logclose,
.d_read = logread,
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 272cc4a..5791978 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -78,6 +78,7 @@ static d_kqfilter_t cnkqfilter;
* XXX: kern_conf.c knows what to do when it sees 256.
*/
static struct cdevsw cn_cdevsw = {
+ .d_version = D_VERSION,
.d_open = cnopen,
.d_close = cnclose,
.d_read = cnread,
@@ -86,7 +87,7 @@ static struct cdevsw cn_cdevsw = {
.d_poll = cnpoll,
.d_name = "console",
.d_maj = 256,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
.d_kqfilter = cnkqfilter,
};
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 */
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 985a877..96fa84b 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -38,10 +38,11 @@ static d_open_t cttyopen;
#define CDEV_MAJOR 1
static struct cdevsw ctty_cdevsw = {
+ .d_version = D_VERSION,
.d_open = cttyopen,
.d_name = "ctty",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static dev_t ctty;
OpenPOWER on IntegriCloud