summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2003-10-16 11:30:01 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2003-10-16 11:30:01 +0000
commit193df2a53487bd1db9c13999c388dec5f24120dd (patch)
tree9f9e83ca456d7eafe1e585392a81ad0d8cf95ceb
parenteff67c4e62ce35c5058cbab273a8fd71834f85ff (diff)
Allow setting of wdcdebug*_mask variables via preprocessor defines.
This makes creating debug kernels be much more easy.
-rw-r--r--sys/dev/ata/ata_wdc.c7
-rw-r--r--sys/dev/atapiscsi/atapiscsi.c7
-rw-r--r--sys/dev/ic/wdc.c7
-rw-r--r--sys/dev/pci/pciide.c7
4 files changed, 20 insertions, 8 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c
index 34b6e4987a4..10d934b217c 100644
--- a/sys/dev/ata/ata_wdc.c
+++ b/sys/dev/ata/ata_wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ata_wdc.c,v 1.22 2003/09/28 21:01:42 grange Exp $ */
+/* $OpenBSD: ata_wdc.c,v 1.23 2003/10/16 11:30:00 grange Exp $ */
/* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */
/*
@@ -96,7 +96,10 @@
#define DEBUG_PROBE 0x10
#ifdef WDCDEBUG
-int wdcdebug_wd_mask = 0;
+#ifndef WDCDEBUG_WD_MASK
+#define WDCDEBUG_WD_MASK 0x00
+#endif
+int wdcdebug_wd_mask = WDCDEBUG_WD_MASK;
#define WDCDEBUG_PRINT(args, level) do { \
if ((wdcdebug_wd_mask & (level)) != 0) \
printf args; \
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c
index 7542a5626f2..ae8ab9f5beb 100644
--- a/sys/dev/atapiscsi/atapiscsi.c
+++ b/sys/dev/atapiscsi/atapiscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiscsi.c,v 1.64 2003/09/28 21:01:43 grange Exp $ */
+/* $OpenBSD: atapiscsi.c,v 1.65 2003/10/16 11:30:00 grange Exp $ */
/*
* This code is derived from code with the copyright below.
@@ -91,7 +91,10 @@ enum atapi_drive_states {
#define DEBUG_ERRORS 0x80 /* Debug error handling code */
#if defined(WDCDEBUG)
-int wdcdebug_atapi_mask = 0;
+#ifndef WDCDEBUG_ATAPI_MASK
+#define WDCDEBUG_ATAPI_MASK 0x00
+#endif
+int wdcdebug_atapi_mask = WDCDEBUG_ATAPI_MASK;
#define WDCDEBUG_PRINT(args, level) do { \
if ((wdcdebug_atapi_mask & (level)) != 0) \
printf args; \
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 2c65061059b..e1f7215ed02 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdc.c,v 1.64 2003/10/16 10:07:59 grange Exp $ */
+/* $OpenBSD: wdc.c,v 1.65 2003/10/16 11:30:00 grange Exp $ */
/* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */
@@ -117,7 +117,10 @@ void wdc_kill_pending(struct channel_softc *);
#define DEBUG_DETACH 0x80
#ifdef WDCDEBUG
-int wdcdebug_mask = 0;
+#ifndef WDCDEBUG_MASK
+#define WDCDEBUG_MASK 0x00
+#endif
+int wdcdebug_mask = WDCDEBUG_MASK;
int wdc_nxfer = 0;
#define WDCDEBUG_PRINT(args, level) do { \
if ((wdcdebug_mask & (level)) != 0) \
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 66d15d49108..fd26474228c 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.141 2003/10/09 18:57:00 grange Exp $ */
+/* $OpenBSD: pciide.c,v 1.142 2003/10/16 11:30:00 grange Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -80,7 +80,10 @@
#define DEBUG_PROBE 0x10
#ifdef WDCDEBUG
-int wdcdebug_pciide_mask = 0;
+#ifndef WDCDEBUG_PCIIDE_MASK
+#define WDCDEBUG_PCIIDE_MASK 0x00
+#endif
+int wdcdebug_pciide_mask = WDCDEBUG_PCIIDE_MASK;
#define WDCDEBUG_PRINT(args, level) do { \
if ((wdcdebug_pciide_mask & (level)) != 0) \
printf args; \