Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Don't display some (non-exceptional) events unles...



details:   https://anonhg.NetBSD.org/src/rev/4a184f0b0f7c
branches:  trunk
changeset: 521533:4a184f0b0f7c
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Feb 01 13:35:41 2002 +0000

description:
Don't display some (non-exceptional) events unless IFF_DEBUG is set.
I have a card that fires a continuos stream of "connected" events (one
every 30 seconds) while it hasn't found any peer.

diffstat:

 sys/dev/ic/wi.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r d8320a51a491 -r 4a184f0b0f7c sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c   Fri Feb 01 11:31:56 2002 +0000
+++ b/sys/dev/ic/wi.c   Fri Feb 01 13:35:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wi.c,v 1.37 2002/01/21 21:55:05 ichiro Exp $   */
+/*     $NetBSD: wi.c,v 1.38 2002/02/01 13:35:41 martin Exp $   */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.37 2002/01/21 21:55:05 ichiro Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.38 2002/02/01 13:35:41 martin Exp $");
 
 #define WI_HERMES_AUTOINC_WAR  /* Work around data write autoinc bug. */
 #define WI_HERMES_STATS_WAR    /* Work around stats counter bug. */
@@ -584,7 +584,13 @@
 #endif
                        break;
                }
-               printf("%s: %s\n", sc->sc_dev.dv_xname, msg[t - 1]);
+               /*
+                * Some cards issue streams of "connected" messages while
+                * trying to find a peer. Don't bother the user with this
+                * unless he is debugging.
+                */
+               if (t > 2 || (ifp->if_flags & IFF_DEBUG))
+                       printf("%s: %s\n", sc->sc_dev.dv_xname, msg[t - 1]);
                break;
                }
 



Home | Main Index | Thread Index | Old Index