Source-Changes-HG archive

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

[src/trunk]: src/sys/kern print which process asked for an unsupported event ...



details:   https://anonhg.NetBSD.org/src/rev/f4a9e383e6d7
branches:  trunk
changeset: 1004252:f4a9e383e6d7
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 18 19:43:49 2019 +0000

description:
print which process asked for an unsupported event so we can fix it.

diffstat:

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

diffs (33 lines):

diff -r 37a883b3f01d -r f4a9e383e6d7 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c     Fri Oct 18 17:16:50 2019 +0000
+++ b/sys/kern/kern_event.c     Fri Oct 18 19:43:49 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_event.c,v 1.104 2018/11/13 06:58:14 maxv Exp $    */
+/*     $NetBSD: kern_event.c,v 1.105 2019/10/18 19:43:49 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.104 2018/11/13 06:58:14 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.105 2019/10/18 19:43:49 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1122,9 +1122,12 @@
                        KERNEL_UNLOCK_ONE(NULL);        /* XXXSMP */
                        if (error != 0) {
 #ifdef DEBUG
+                               struct proc *p = curlwp->l_proc;
                                const file_t *ft = kn->kn_obj;
-                               uprintf("%s: event type %d not supported for "
-                                   "file type %d/%s (error %d)\n", __func__,
+                               printf("%s: %s[%d]: event type %d not "
+                                   "supported for file type %d/%s "
+                                   "(error %d)\n", __func__,
+                                   p->p_comm, p->p_pid,
                                    kn->kn_filter, ft ? ft->f_type : -1,
                                    ft ? ft->f_ops->fo_name : "?", error);
 #endif



Home | Main Index | Thread Index | Old Index