summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-03 16:24:47 +0000
committerphk <phk@FreeBSD.org>2003-03-03 16:24:47 +0000
commitb67232b68cdcbb54dc3a2311609828aced7ecc25 (patch)
tree882ecd3451f5d9cf0721da1f4041961ac8528fe7 /sys
parent8b25734b0597b951f2979117d6d4848fbca61813 (diff)
downloadFreeBSD-src-b67232b68cdcbb54dc3a2311609828aced7ecc25.zip
FreeBSD-src-b67232b68cdcbb54dc3a2311609828aced7ecc25.tar.gz
Make nokqfilter() return the correct return value.
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers.
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/scsi/scsi_target.c1
-rw-r--r--sys/dev/cy/cy.c2
-rw-r--r--sys/dev/cy/cy_isa.c2
-rw-r--r--sys/dev/dgb/dgb.c2
-rw-r--r--sys/dev/digi/digi.c2
-rw-r--r--sys/dev/rc/rc.c2
-rw-r--r--sys/dev/sab/sab.c2
-rw-r--r--sys/dev/si/si.c2
-rw-r--r--sys/dev/sio/sio.c2
-rw-r--r--sys/dev/syscons/syscons.c2
-rw-r--r--sys/dev/usb/ucom.c2
-rw-r--r--sys/dev/zs/zs.c2
-rw-r--r--sys/fs/specfs/spec_vnops.c2
-rw-r--r--sys/i386/isa/cx.c2
-rw-r--r--sys/i386/isa/cy.c2
-rw-r--r--sys/i386/isa/istallion.c2
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c2
-rw-r--r--sys/i386/isa/stallion.c2
-rw-r--r--sys/kern/subr_xxx.c2
-rw-r--r--sys/kern/tty_cons.c2
-rw-r--r--sys/kern/tty_pty.c4
-rw-r--r--sys/net/if.c1
-rw-r--r--sys/pc98/cbus/sio.c2
-rw-r--r--sys/pc98/pc98/sio.c2
-rw-r--r--sys/pc98/pc98/syscons.c2
-rw-r--r--sys/sys/conf.h1
-rw-r--r--sys/sys/linedisc.h1
27 files changed, 23 insertions, 29 deletions
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index de7e05c..b65ebec 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -113,7 +113,6 @@ static struct cdevsw targ_cdevsw = {
.d_poll = targpoll,
.d_name = "targ",
.d_maj = TARG_CDEV_MAJOR,
- .d_flags = D_KQFILTER,
.d_kqfilter = targkqfilter
};
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 53ea3bc..4e2e499 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -405,7 +405,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 53ea3bc..4e2e499 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -405,7 +405,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index b702297..e77e2f1 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -250,7 +250,7 @@ static struct cdevsw dgb_cdevsw = {
.d_poll = ttypoll,
.d_name = "dgb",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 42c1b1c..22f1b2e 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -151,7 +151,7 @@ static struct cdevsw digi_sw = {
.d_poll = ttypoll,
.d_name = driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter
};
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index eb023d8..07c0c5b 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -154,7 +154,7 @@ static struct cdevsw rc_cdevsw = {
.d_poll = ttypoll,
.d_name = "rc",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 56fd6ea..362e8b7 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -168,7 +168,7 @@ static struct cdevsw sabtty_cdevsw = {
.d_poll = ttypoll,
.d_name = "sabtty",
.d_maj = MAJOR_AUTO,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index ef37bfd..d96266c 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -124,7 +124,7 @@ static struct cdevsw si_cdevsw = {
.d_poll = ttypoll,
.d_name = "si",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 9f28b32..b3d8d21 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -322,7 +322,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = sio_driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 1cf572b..b6b8e6b 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -221,7 +221,7 @@ static struct cdevsw sc_cdevsw = {
.d_mmap = scmmap,
.d_name = "sc",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter
};
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 5409913..c25bc39 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -136,7 +136,7 @@ static struct cdevsw ucom_cdevsw = {
.d_poll = ttypoll,
.d_name = "ucom",
.d_maj = UCOM_CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
#if __FreeBSD_version < 500014
/* bmaj */ -1,
#endif
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 9ee3cdf..d901e10 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -158,7 +158,7 @@ static struct cdevsw zstty_cdevsw = {
.d_poll = ttypoll,
.d_name = "zstty",
.d_maj = MAJOR_AUTO,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index f8c8a43..4cbc308 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -392,8 +392,6 @@ spec_kqfilter(ap)
dev = ap->a_vp->v_rdev;
dsw = devsw(dev);
- if (!(dsw->d_flags & D_KQFILTER))
- return (1);
if (dsw->d_flags & D_NOGIANT) {
DROP_GIANT();
error = dsw->d_kqfilter(dev, ap->a_kn);
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index 0892a0f..5f5f92e 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -81,7 +81,7 @@ struct cdevsw cx_cdevsw = {
.d_poll = ttypoll,
.d_name = "cx",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 53ea3bc..4e2e499 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -405,7 +405,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index d988687..9397d59 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -650,7 +650,7 @@ static struct cdevsw stli_cdevsw = {
.d_poll = ttypoll,
.d_name = stli_drvname,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 55570ea..e795180 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -105,7 +105,7 @@ static struct cdevsw vt_cdevsw = {
.d_mmap = pcvt_mmap,
.d_name = "vt",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index ebf3534..5218547 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -544,7 +544,7 @@ static struct cdevsw stl_cdevsw = {
.d_poll = ttypoll,
.d_name = "stl",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/kern/subr_xxx.c b/sys/kern/subr_xxx.c
index 85ec59b..448a8e2 100644
--- a/sys/kern/subr_xxx.c
+++ b/sys/kern/subr_xxx.c
@@ -128,7 +128,7 @@ nokqfilter(dev, kn)
struct knote *kn;
{
- return (ENODEV);
+ return (1);
}
int
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index e536b45..cd5c84f 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -79,7 +79,7 @@ static struct cdevsw cn_cdevsw = {
.d_poll = cnpoll,
.d_name = "console",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = cnkqfilter,
};
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 1561eb1..d3ba47a 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -85,7 +85,7 @@ static struct cdevsw pts_cdevsw = {
.d_poll = ttypoll,
.d_name = "pts",
.d_maj = CDEV_MAJOR_S,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
@@ -99,7 +99,7 @@ static struct cdevsw ptc_cdevsw = {
.d_poll = ptcpoll,
.d_name = "ptc",
.d_maj = CDEV_MAJOR_C,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/net/if.c b/sys/net/if.c
index bad9780..3e91661 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -136,7 +136,6 @@ static struct cdevsw net_cdevsw = {
.d_ioctl = netioctl,
.d_name = "net",
.d_maj = MAJOR_AUTO,
- .d_flags = D_KQFILTER,
.d_kqfilter = netkqfilter,
};
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 3ec2bee..1dc212b 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -415,7 +415,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = sio_driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 3ec2bee..1dc212b 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -415,7 +415,7 @@ static struct cdevsw sio_cdevsw = {
.d_poll = ttypoll,
.d_name = sio_driver_name,
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter,
};
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index 7220f70..dcd9048 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -221,7 +221,7 @@ static struct cdevsw sc_cdevsw = {
.d_mmap = scmmap,
.d_name = "sc",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY | D_KQFILTER,
+ .d_flags = D_TTY,
.d_kqfilter = ttykqfilter
};
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index d0f2229..1bb71b3 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -213,7 +213,6 @@ typedef int dumper_t(
#define D_NAGGED 0x00020000 /* nagged about missing make_dev() */
#define D_TRACKCLOSE 0x00080000 /* track all closes */
#define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */
-#define D_KQFILTER 0x00200000 /* has kqfilter entry */
#define D_NOGIANT 0x00400000 /* Doesn't want Giant */
/*
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index d0f2229..1bb71b3 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -213,7 +213,6 @@ typedef int dumper_t(
#define D_NAGGED 0x00020000 /* nagged about missing make_dev() */
#define D_TRACKCLOSE 0x00080000 /* track all closes */
#define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */
-#define D_KQFILTER 0x00200000 /* has kqfilter entry */
#define D_NOGIANT 0x00400000 /* Doesn't want Giant */
/*
OpenPOWER on IntegriCloud