diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-07-02 22:20:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-07-02 22:20:09 +0000 |
commit | b465f3e780026bbb1f86ec7a6203a06672328984 (patch) | |
tree | d469d9b497adf66bfe8e193b90c248fdbe819588 /sys | |
parent | 97d8260479f882ea93b1225536948b7ce658b9dd (diff) |
kqueue attach functions should return an errno or 0, not a plain 1. Fix
the obvious cases to return EINVAL and ENXIO.
ok tedu deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_apm.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/apm.c | 4 | ||||
-rw-r--r-- | sys/arch/loongson/dev/apm.c | 4 | ||||
-rw-r--r-- | sys/arch/mac68k/dev/asc.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/dev/apm.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/tctrl.c | 4 | ||||
-rw-r--r-- | sys/dev/acpi/acpi.c | 6 | ||||
-rw-r--r-- | sys/dev/audio.c | 4 | ||||
-rw-r--r-- | sys/dev/cons.c | 6 | ||||
-rw-r--r-- | sys/dev/hotplug.c | 4 | ||||
-rw-r--r-- | sys/dev/midi.c | 4 | ||||
-rw-r--r-- | sys/dev/sequencer.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ugen.c | 14 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uscanner.c | 6 | ||||
-rw-r--r-- | sys/dev/vscsi.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_event.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_log.c | 4 | ||||
-rw-r--r-- | sys/kern/tty.c | 4 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_default.c | 4 | ||||
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 4 | ||||
-rw-r--r-- | sys/net/bpf.c | 4 | ||||
-rw-r--r-- | sys/net/if_pppx.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 4 |
27 files changed, 62 insertions, 62 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_apm.c b/sys/arch/arm/xscale/pxa2x0_apm.c index e55558bdd3c..664cc67a341 100644 --- a/sys/arch/arm/xscale/pxa2x0_apm.c +++ b/sys/arch/arm/xscale/pxa2x0_apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_apm.c,v 1.36 2010/09/08 21:18:14 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_apm.c,v 1.37 2011/07/02 22:20:07 nicm Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -644,7 +644,7 @@ apmkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &apmread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index d0516dc1d90..c6e1cc1a22a 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.97 2011/06/29 16:18:04 tedu Exp $ */ +/* $OpenBSD: apm.c,v 1.98 2011/07/02 22:20:07 nicm Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -1130,7 +1130,7 @@ apmkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &apmread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c index dcf3af43eb6..66dfcfe7444 100644 --- a/sys/arch/loongson/dev/apm.c +++ b/sys/arch/loongson/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.8 2010/09/09 19:06:15 miod Exp $ */ +/* $OpenBSD: apm.c,v 1.9 2011/07/02 22:20:07 nicm Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -301,7 +301,7 @@ apmkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &apmread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c index e221a1675d3..01e06912d10 100644 --- a/sys/arch/mac68k/dev/asc.c +++ b/sys/arch/mac68k/dev/asc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asc.c,v 1.28 2010/12/26 15:40:59 miod Exp $ */ +/* $OpenBSD: asc.c,v 1.29 2011/07/02 22:20:07 nicm Exp $ */ /* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */ /* @@ -366,5 +366,5 @@ asckqfilter(dev, kn) dev_t dev; struct knote *kn; { - return (1); + return (ENXIO); } diff --git a/sys/arch/macppc/dev/apm.c b/sys/arch/macppc/dev/apm.c index b22c77245e0..4eaf04968a9 100644 --- a/sys/arch/macppc/dev/apm.c +++ b/sys/arch/macppc/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.16 2011/06/16 10:44:33 mpi Exp $ */ +/* $OpenBSD: apm.c,v 1.17 2011/07/02 22:20:07 nicm Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -329,7 +329,7 @@ apmkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &apmread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/arch/sparc/dev/tctrl.c b/sys/arch/sparc/dev/tctrl.c index 5fc11d2ed3d..a72b9aafa74 100644 --- a/sys/arch/sparc/dev/tctrl.c +++ b/sys/arch/sparc/dev/tctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tctrl.c,v 1.20 2009/02/26 17:19:47 oga Exp $ */ +/* $OpenBSD: tctrl.c,v 1.21 2011/07/02 22:20:07 nicm Exp $ */ /* $NetBSD: tctrl.c,v 1.2 1999/08/11 00:46:06 matt Exp $ */ /*- @@ -1184,7 +1184,7 @@ apmkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &apmread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 231f34b3f83..c8bd966430f 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.226 2011/06/24 19:47:49 naddy Exp $ */ +/* $OpenBSD: acpi.c,v 1.227 2011/07/02 22:20:07 nicm Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2632,7 +2632,7 @@ acpikqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &acpiread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = sc; @@ -2667,6 +2667,6 @@ acpiioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) int acpikqfilter(dev_t dev, struct knote *kn) { - return (1); + return (ENXIO); } #endif /* SMALL_KERNEL */ diff --git a/sys/dev/audio.c b/sys/dev/audio.c index bb693256e28..66a825312e3 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.112 2011/06/06 06:13:45 deraadt Exp $ */ +/* $OpenBSD: audio.c,v 1.113 2011/07/02 22:20:07 nicm Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -3309,7 +3309,7 @@ audiokqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &audiowrite_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)sc; diff --git a/sys/dev/cons.c b/sys/dev/cons.c index 717165b210e..df76b84d515 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.c,v 1.21 2011/04/19 21:53:36 chl Exp $ */ +/* $OpenBSD: cons.c,v 1.22 2011/07/02 22:20:07 nicm Exp $ */ /* $NetBSD: cons.c,v 1.30 1996/04/08 19:57:30 jonathan Exp $ */ /* @@ -214,12 +214,12 @@ cnkqfilter(dev_t dev, struct knote *kn) if (constty != NULL) dev = constty->t_dev; else if (cn_tab == NULL) - return (1); + return (ENXIO); else dev = cn_tab->cn_dev; if (cdevsw[major(dev)].d_flags & D_KQFILTER) return ((*cdevsw[major(dev)].d_kqfilter)(dev, kn)); - return (1); + return (ENXIO); } int diff --git a/sys/dev/hotplug.c b/sys/dev/hotplug.c index 0013b67d0b5..2936751b04b 100644 --- a/sys/dev/hotplug.c +++ b/sys/dev/hotplug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hotplug.c,v 1.11 2010/12/15 03:34:33 tedu Exp $ */ +/* $OpenBSD: hotplug.c,v 1.12 2011/07/02 22:20:07 nicm Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -204,7 +204,7 @@ hotplugkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &hotplugread_filtops; break; default: - return (1); + return (EINVAL); } s = splbio(); diff --git a/sys/dev/midi.c b/sys/dev/midi.c index ae6644e50e9..d0fb2bb9a5c 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.25 2011/01/27 20:37:19 ratchov Exp $ */ +/* $OpenBSD: midi.c,v 1.26 2011/07/02 22:20:07 nicm Exp $ */ /* * Copyright (c) 2003, 2004 Alexandre Ratchov @@ -401,7 +401,7 @@ midikqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &midiwrite_filtops; break; default: - return (EPERM); + return (EINVAL); } kn->kn_hook = (void *)sc; diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 4f77257b76c..c50750cf05e 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sequencer.c,v 1.21 2011/06/23 16:02:33 tedu Exp $ */ +/* $OpenBSD: sequencer.c,v 1.22 2011/07/02 22:20:07 nicm Exp $ */ /* $NetBSD: sequencer.c,v 1.13 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -618,7 +618,7 @@ sequencerpoll(dev_t dev, int events, struct proc *p) int sequencerkqfilter(dev_t dev, struct knote *kn) { - return (EPERM); + return (ENXIO); } void diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index aa9c673e2cf..8ed3dd5610b 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.64 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: ugen.c,v 1.65 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -1406,12 +1406,12 @@ ugenkqfilter(dev_t dev, struct knote *kn) sc = ugen_cd.cd_devs[UGENUNIT(dev)]; if (sc->sc_dying) - return (1); + return (ENXIO); /* XXX always IN */ sce = &sc->sc_endpoints[UGENENDPOINT(dev)][IN]; if (sce == NULL) - return (1); + return (EINVAL); switch (kn->kn_filter) { case EVFILT_READ: @@ -1432,7 +1432,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ugen_seltrue_filtops; break; default: - return (1); + return (EINVAL); } break; @@ -1442,7 +1442,7 @@ ugenkqfilter(dev_t dev, struct knote *kn) case UE_INTERRUPT: case UE_ISOCHRONOUS: /* XXX poll doesn't support this */ - return (1); + return (EINVAL); case UE_BULK: /* @@ -1453,12 +1453,12 @@ ugenkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ugen_seltrue_filtops; break; default: - return (1); + return (EINVAL); } break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)sce; diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 3b564cbf39a..0a4393f9e5a 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.51 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: uhid.c,v 1.52 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -564,7 +564,7 @@ uhidkqfilter(dev_t dev, struct knote *kn) break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)sc; diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 2ef694688d7..59c39033957 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uscanner.c,v 1.44 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: uscanner.c,v 1.45 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */ /* @@ -656,7 +656,7 @@ uscannerkqfilter(dev_t dev, struct knote *kn) sc = uscanner_cd.cd_devs[USCANNERUNIT(dev)]; if (sc->sc_dying) - return (1); + return (ENXIO); switch (kn->kn_filter) { case EVFILT_READ: @@ -671,7 +671,7 @@ uscannerkqfilter(dev_t dev, struct knote *kn) break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)sc; diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index 15ad5d1576c..e7341e20fdd 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.23 2011/04/28 11:24:36 dlg Exp $ */ +/* $OpenBSD: vscsi.c,v 1.24 2011/07/02 22:20:07 nicm Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -504,7 +504,7 @@ vscsikqfilter(dev_t dev, struct knote *kn) break; default: device_unref(&sc->sc_dev); - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)sc; diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 2475ba0f50d..d43c013d4c2 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.40 2011/05/03 15:59:50 marco Exp $ */ +/* $OpenBSD: kern_event.c,v 1.41 2011/07/02 22:20:08 nicm Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -164,7 +164,7 @@ kqueue_kqfilter(struct file *fp, struct knote *kn) struct kqueue *kq = (struct kqueue *)kn->kn_fp->f_data; if (kn->kn_filter != EVFILT_READ) - return (1); + return (EINVAL); kn->kn_fop = &kqread_filtops; SLIST_INSERT_HEAD(&kq->kq_sel.si_note, kn, kn_selnext); diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 01550138f57..84fa91dcba9 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_log.c,v 1.16 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: subr_log.c,v 1.17 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: subr_log.c,v 1.11 1996/03/30 22:24:44 christos Exp $ */ /* @@ -219,7 +219,7 @@ logkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &logread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (void *)msgbufp; diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 1cf4a411f35..a56d88c258d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.91 2011/04/18 21:44:56 guenther Exp $ */ +/* $OpenBSD: tty.c,v 1.92 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -1099,7 +1099,7 @@ ttkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ttywrite_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)((u_long)dev); diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 8539d2d54ce..54f7b0d7ec5 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.55 2011/04/18 21:44:56 guenther Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.56 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -741,7 +741,7 @@ ptckqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &ptcwrite_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)pti; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index e06ce48339f..fc8811726de 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.92 2011/05/02 13:48:38 mikeb Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.93 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1638,7 +1638,7 @@ soo_kqfilter(struct file *fp, struct knote *kn) sb = &so->so_snd; break; default: - return (1); + return (EINVAL); } s = splnet(); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 32527afcdb7..f43f3f90fd6 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_default.c,v 1.37 2008/05/03 14:41:29 thib Exp $ */ +/* $OpenBSD: vfs_default.c,v 1.38 2011/07/02 22:20:08 nicm Exp $ */ /* * Portions of this code are: @@ -200,7 +200,7 @@ vop_generic_kqfilter(void *v) kn->kn_fop = &generic_filtops; break; default: - return (1); + return (EINVAL); } return (0); diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 3ca1c27c7ee..2edeaaf0ba6 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo_vnops.c,v 1.35 2011/04/05 14:14:07 thib Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.36 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -477,7 +477,7 @@ fifo_kqfilter(void *v) sb = &so->so_snd; break; default: - return (1); + return (EINVAL); } ap->a_kn->kn_hook = so; diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 051f41cf801..c602a6a4e11 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.77 2011/01/04 15:24:11 deraadt Exp $ */ +/* $OpenBSD: bpf.c,v 1.78 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1070,7 +1070,7 @@ bpfkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &bpfread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)((u_long)dev); diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 1b54ee0ae87..a624eedfbef 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.7 2011/04/14 05:13:45 dlg Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.8 2011/07/02 22:20:08 nicm Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -513,7 +513,7 @@ pppxkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &pppx_wr_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)pxd; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index d9f6e7a27c0..ef649750c68 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.109 2010/09/23 04:47:02 matthew Exp $ */ +/* $OpenBSD: if_tun.c,v 1.110 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -1051,7 +1051,7 @@ tunkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &tunwrite_filtops; break; default: - return (EPERM); /* 1 */ + return (EINVAL); } kn->kn_hook = (caddr_t)tp; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index a7084790b73..8b72e4d7da8 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.98 2011/07/02 15:52:25 thib Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.99 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -1933,7 +1933,7 @@ ufs_kqfilter(void *v) kn->kn_fop = &ufsvnode_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)vp; |