Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sbus make all debugging messages conditional on sc->...



details:   https://anonhg.NetBSD.org/src/rev/28f8a346c8b9
branches:  trunk
changeset: 507735:28f8a346c8b9
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Mar 30 17:30:18 2001 +0000

description:
make all debugging messages conditional on sc->sc_debug.

diffstat:

 sys/dev/sbus/qe.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 080b128e0bbe -r 28f8a346c8b9 sys/dev/sbus/qe.c
--- a/sys/dev/sbus/qe.c Fri Mar 30 17:18:47 2001 +0000
+++ b/sys/dev/sbus/qe.c Fri Mar 30 17:30:18 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: qe.c,v 1.15 2001/03/08 02:20:40 thorpej Exp $  */
+/*     $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -632,9 +632,12 @@
 
        if (qestat & QE_CR_STAT_ALLERRORS) {
 #ifdef QEDEBUG
-               char bits[64];
-               printf("qe%d: eint: qestat=%s\n", sc->sc_channel,
-               bitmask_snprintf(qestat, QE_CR_STAT_BITS, bits, sizeof(bits)));
+               if (sc->sc_debug) {
+                       char bits[64];
+                       printf("qe%d: eint: qestat=%s\n", sc->sc_channel,
+                           bitmask_snprintf(qestat, QE_CR_STAT_BITS, bits,
+                           sizeof(bits)));
+               }
 #endif
                r |= qe_eint(sc, qestat);
                if (r == -1)
@@ -730,7 +733,7 @@
                        bix = 0;
        }
 #ifdef QEDEBUG
-       if (npackets == 0)
+       if (npackets == 0 && sc->sc_debug)
                printf("%s: rint: no packets; rb index %d; status 0x%x\n",
                        sc->sc_dev.dv_xname, bix, len);
 #endif



Home | Main Index | Thread Index | Old Index