summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-08-15 00:07:07 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-08-15 00:07:07 +0000
commit5e8a6507dd6eab229c36870778df4123321ab930 (patch)
tree048660b5ad65bc4f9995fbf2006d6e7d95a26046 /sys/dev
parenta53e72d29b79e10e419a9371940353fe3fe72a31 (diff)
add DPRINTF and DASSERT debug macros.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_nxe.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c
index ac5fe19b290..cbdb6d78dd8 100644
--- a/sys/dev/pci/if_nxe.c
+++ b/sys/dev/pci/if_nxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nxe.c,v 1.7 2007/08/15 00:05:17 dlg Exp $ */
+/* $OpenBSD: if_nxe.c,v 1.8 2007/08/15 00:07:06 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -48,6 +48,17 @@
#include <netinet/if_ether.h>
#endif
+#ifdef NXE_DEBUG
+int nxedebug = 0;
+
+#define DPRINTF(l, f...) do { if (nxedebug & (l)) printf(f); } while (0)
+#define DASSERT(_a) assert(_a)
+#else
+#define DPRINTF(l, f...)
+#define DASSERT(_a)
+#endif
+
+
/*
* PCI configuration space registers
*/