diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index de7e05cea61..b65ebecb8f9 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 53ea3bccd65..4e2e499da1a 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 53ea3bccd65..4e2e499da1a 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 b702297f792..e77e2f1ca19 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 42c1b1ce4a6..22f1b2eb735 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 eb023d8ba38..07c0c5b913c 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 56fd6ea7b80..362e8b72a35 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 ef37bfdd675..d96266ce069 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 9f28b32199d..b3d8d21a78e 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 1cf572b3251..b6b8e6b0f2e 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 5409913aaef..c25bc39e326 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 9ee3cdf3cf9..d901e10501f 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 f8c8a431dd5..4cbc308abdc 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 0892a0fbfc5..5f5f92e74e0 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 53ea3bccd65..4e2e499da1a 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 d9886873a43..9397d593e9c 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 55570ea5197..e795180d29d 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 ebf3534db4b..52185478ea3 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 85ec59b5256..448a8e26f02 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 e536b45287b..cd5c84f7d85 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 1561eb1155b..d3ba47ab959 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 bad97806b46..3e91661a329 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 3ec2bee6010..1dc212bbdc9 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 3ec2bee6010..1dc212bbdc9 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 7220f705715..dcd90488ea3 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 d0f2229c804..1bb71b38f5e 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 d0f2229c804..1bb71b38f5e 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 */ /*