Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Put previous removed diagnostic back as debug. It h...



details:   https://anonhg.NetBSD.org/src/rev/eb75eb98688a
branches:  trunk
changeset: 357856:eb75eb98688a
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 30 14:19:27 2017 +0000

description:
Put previous removed diagnostic back as debug. It has caught in the past
(and now) different kqueue behavior between NetBSD and other kqueue
implementations that depend on specific file types. If 3rd party programs
trigger this it is probably because we are doing something different.

diffstat:

 sys/kern/kern_event.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r e9f7ecc9edb4 -r eb75eb98688a sys/kern/kern_event.c
--- a/sys/kern/kern_event.c     Thu Nov 30 11:56:45 2017 +0000
+++ b/sys/kern/kern_event.c     Thu Nov 30 14:19:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_event.c,v 1.99 2017/11/30 05:52:40 riastradh Exp $        */
+/*     $NetBSD: kern_event.c,v 1.100 2017/11/30 14:19:27 christos Exp $        */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.99 2017/11/30 05:52:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.100 2017/11/30 14:19:27 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1063,6 +1063,13 @@
                        error = (*kfilter->filtops->f_attach)(kn);
                        KERNEL_UNLOCK_ONE(NULL);        /* XXXSMP */
                        if (error != 0) {
+#ifdef DEBUG
+                               printf("%s: event type %d not supported for "
+                                   "file type %d (error %d)\n", __func__,
+                                   kn->kn_filter, kn->kn_obj ?
+                                   ((file_t *)kn->kn_obj)->f_type : -1, error);
+#endif
+
                                /* knote_detach() drops fdp->fd_lock */
                                knote_detach(kn, fdp, false);
                                goto done;



Home | Main Index | Thread Index | Old Index