diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-06 21:43:49 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-06 21:43:49 +0000 |
commit | b3efe1bf17f3b1f70522a57b58ead18be3ea3e6e (patch) | |
tree | 86b8280634b4a797fdfe9b6390b8537dd80e7505 /sys/dev | |
parent | 21d83401dd57aa8761ec0d503af1c87eb5c0b24c (diff) |
Use separate compile time debug flags for xen, xnf and xbf
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pv/if_xnf.c | 9 | ||||
-rw-r--r-- | sys/dev/pv/xbf.c | 12 | ||||
-rw-r--r-- | sys/dev/pv/xen.c | 10 | ||||
-rw-r--r-- | sys/dev/pv/xenstore.c | 12 | ||||
-rw-r--r-- | sys/dev/pv/xenvar.h | 10 |
5 files changed, 38 insertions, 15 deletions
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index 5ba44603661..4a2ea2040f9 100644 --- a/sys/dev/pv/if_xnf.c +++ b/sys/dev/pv/if_xnf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xnf.c,v 1.48 2017/01/24 03:57:35 dlg Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.49 2017/02/06 21:43:48 mikeb Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -53,6 +53,13 @@ #include <net/bpf.h> #endif +/* #define XNF_DEBUG */ + +#ifdef XNF_DEBUG +#define DPRINTF(x...) printf(x) +#else +#define DPRINTF(x...) +#endif /* * Rx ring diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 89864b96047..dffe39a6a81 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.16 2017/01/19 12:36:50 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.17 2017/02/06 21:43:48 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -38,6 +38,14 @@ #include <scsi/scsi_disk.h> #include <scsi/scsiconf.h> +/* #define XBF_DEBUG */ + +#ifdef XBF_DEBUG +#define DPRINTF(x...) printf(x) +#else +#define DPRINTF(x...) +#endif + #define XBF_OP_READ 0 #define XBF_OP_WRITE 1 #define XBF_OP_BARRIER 2 /* feature-barrier */ @@ -985,7 +993,7 @@ xbf_init(struct xbf_softc *sc) if (error == 0 && res == 1) sc->sc_caps |= XBF_CAP_FLUSH; -#ifdef XEN_DEBUG +#ifdef XBF_DEBUG if (sc->sc_caps) { printf("%s: features:", sc->sc_dev.dv_xname); if (sc->sc_caps & XBF_CAP_BARRIER) diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c index e4036af176b..b09ec2aa041 100644 --- a/sys/dev/pv/xen.c +++ b/sys/dev/pv/xen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xen.c,v 1.73 2017/01/31 12:17:20 mikeb Exp $ */ +/* $OpenBSD: xen.c,v 1.74 2017/02/06 21:43:48 mikeb Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -55,6 +55,14 @@ #include <dev/pv/xenreg.h> #include <dev/pv/xenvar.h> +/* #define XEN_DEBUG */ + +#ifdef XEN_DEBUG +#define DPRINTF(x...) printf(x) +#else +#define DPRINTF(x...) +#endif + struct xen_softc *xen_sc; int xen_init_hypercall(struct xen_softc *); diff --git a/sys/dev/pv/xenstore.c b/sys/dev/pv/xenstore.c index 5168c17124c..2421d2d1574 100644 --- a/sys/dev/pv/xenstore.c +++ b/sys/dev/pv/xenstore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xenstore.c,v 1.37 2017/01/12 20:29:46 mikeb Exp $ */ +/* $OpenBSD: xenstore.c,v 1.38 2017/02/06 21:43:48 mikeb Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -35,6 +35,14 @@ #include <dev/pv/xenreg.h> #include <dev/pv/xenvar.h> +/* #define XS_DEBUG */ + +#ifdef XS_DEBUG +#define DPRINTF(x...) printf(x) +#else +#define DPRINTF(x...) +#endif + /* * The XenStore interface is a simple storage system that is a means of * communicating state and configuration data between the Xen Domain 0 @@ -795,7 +803,7 @@ xs_cmd(struct xs_transaction *xst, int cmd, const char *path, KASSERT(iov && iov_cnt); error = xs_parse(xst, xsm, iov, iov_cnt); } -#ifdef XEN_DEBUG +#ifdef XS_DEBUG else if (strcmp(xsm->xsm_data, "OK")) printf("%s: xenstore request %d failed: %s\n", diff --git a/sys/dev/pv/xenvar.h b/sys/dev/pv/xenvar.h index 82260f5244a..ee2a20ee236 100644 --- a/sys/dev/pv/xenvar.h +++ b/sys/dev/pv/xenvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xenvar.h,v 1.45 2016/12/21 12:17:15 mikeb Exp $ */ +/* $OpenBSD: xenvar.h,v 1.46 2017/02/06 21:43:48 mikeb Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -19,14 +19,6 @@ #ifndef _DEV_PV_XENVAR_H_ #define _DEV_PV_XENVAR_H_ -/* #define XEN_DEBUG */ - -#ifdef XEN_DEBUG -#define DPRINTF(x...) printf(x) -#else -#define DPRINTF(x...) -#endif - static inline void clear_bit(u_int b, volatile void *p) { |