Doug Barton wrote:
> Sam Leffler wrote:
>> The right thing to do is to set wpi_debug to 0 and leave the messages
>> compiled in.
> 
> Well as you can see from the diff I did leave the messages in the
> source so that anyone who wants to enable debugging again can just
> define WPI_DEBUG at build time to get it.
> 
> However defining WPI_DEBUG to 0 resulted in the debug messages being
> printed on the console again so if I'm understanding what you're
> suggesting correctly it seems that it would require a lot more changes
> in the code to accomplish. (I did see other examples of what I think
> you're suggesting in sys/ but this driver doesn't seem to have that
> support.)
> 
> If I'm not understanding something or you have a better solution feel
> free to implement it. My goal was just to get a less noisy console at
> boot time.

Try the attached

        Sam

Index: if_wpi.c
===================================================================
--- if_wpi.c    (revision 199033)
+++ if_wpi.c    (working copy)
@@ -103,6 +103,8 @@
 #include <dev/wpi/if_wpireg.h>
 #include <dev/wpi/if_wpivar.h>
 
+#define WPI_DEBUG
+
 #ifdef WPI_DEBUG
 #define DPRINTF(x)     do { if (wpi_debug != 0) printf x; } while (0)
 #define DPRINTFN(n, x) do { if (wpi_debug & n) printf x; } while (0)
@@ -124,7 +126,7 @@
        WPI_DEBUG_ANY           = 0xffffffff
 };
 
-static int wpi_debug = 1;
+static int wpi_debug = 0;
 SYSCTL_INT(_debug, OID_AUTO, wpi, CTLFLAG_RW, &wpi_debug, 0, "wpi debug 
level");
 TUNABLE_INT("debug.wpi", &wpi_debug);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to