summaryrefslogtreecommitdiff
path: root/sys/dev/cons.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-07-02 22:20:09 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-07-02 22:20:09 +0000
commitb465f3e780026bbb1f86ec7a6203a06672328984 (patch)
treed469d9b497adf66bfe8e193b90c248fdbe819588 /sys/dev/cons.c
parent97d8260479f882ea93b1225536948b7ce658b9dd (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.c6
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