Source-Changes-HG archive

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

[src/trunk]: src/sys/kern don't log an error for ktrace if it's EPIPE - an er...



details:   https://anonhg.NetBSD.org/src/rev/7deddfad1e36
branches:  trunk
changeset: 474898:7deddfad1e36
user:      darrenr <darrenr%NetBSD.org@localhost>
date:      Sun Jul 25 13:59:08 1999 +0000

description:
don't log an error for ktrace if it's EPIPE - an error that should be
expected with fktrace/ktruss (i.e the error is `noise').

diffstat:

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

diffs (26 lines):

diff -r c92709d06588 -r 7deddfad1e36 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c    Sun Jul 25 09:36:02 1999 +0000
+++ b/sys/kern/kern_ktrace.c    Sun Jul 25 13:59:08 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ktrace.c,v 1.37 1999/07/25 06:30:34 thorpej Exp $ */
+/*     $NetBSD: kern_ktrace.c,v 1.38 1999/07/25 13:59:08 darrenr Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -617,10 +617,13 @@
        if (!error)
                return;
        /*
-        * If error encountered, give up tracing on this vnode.
+        * If error encountered, give up tracing on this vnode.  Don't report
+        * EPIPE as this can easily happen with fktrace()/ktruss.
         */
-       log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n",
-           error);
+       if (error != EPIPE)
+               log(LOG_NOTICE,
+                   "ktrace write failed, errno %d, tracing stopped\n",
+                   error);
        proclist_lock_read();
        for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
                if (p->p_tracep == v)



Home | Main Index | Thread Index | Old Index