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/dev/cons.c | |
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/dev/cons.c')
-rw-r--r-- | sys/dev/cons.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |