Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern In kqueue_kqfilter(), return EINVAL instead of 1 if...
details: https://anonhg.NetBSD.org/src/rev/4752f98e2341
branches: trunk
changeset: 1023826:4752f98e2341
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Sep 26 23:37:40 2021 +0000
description:
In kqueue_kqfilter(), return EINVAL instead of 1 if something other than
EVFILT_READ was requested.
diffstat:
sys/kern/kern_event.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ea13c2dc5851 -r 4752f98e2341 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c Sun Sep 26 23:34:46 2021 +0000
+++ b/sys/kern/kern_event.c Sun Sep 26 23:37:40 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_event.c,v 1.125 2021/09/26 23:34:46 thorpej Exp $ */
+/* $NetBSD: kern_event.c,v 1.126 2021/09/26 23:37:40 thorpej Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.125 2021/09/26 23:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.126 2021/09/26 23:37:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1834,7 +1834,7 @@
KASSERT(fp == kn->kn_obj);
if (kn->kn_filter != EVFILT_READ)
- return 1;
+ return EINVAL;
kn->kn_fop = &kqread_filtops;
mutex_enter(&kq->kq_lock);
Home |
Main Index |
Thread Index |
Old Index