aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2023-04-27 07:49:01 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2023-04-27 13:12:55 +0000
commit014e03411f209a833c94f0ee91984d9847ed6df4 (patch)
tree968931af0260506e72b8997d1f38506018b6b701
parent03d3124629e886e4721550a659a032b129ee0347 (diff)
downloadsrc-014e03411f209a833c94f0ee91984d9847ed6df4.tar.gz
src-014e03411f209a833c94f0ee91984d9847ed6df4.zip
-rw-r--r--usr.sbin/bhyve/pci_hda.c2
-rw-r--r--usr.sbin/bhyve/pci_hda.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c
index 07b0e745b0b9..4fc19c52b720 100644
--- a/usr.sbin/bhyve/pci_hda.c
+++ b/usr.sbin/bhyve/pci_hda.c
@@ -324,7 +324,7 @@ hda_init(nvlist_t *nvl)
int err;
#if DEBUG_HDA == 1
- dbg = fopen("/tmp/bhyve_hda.log", "w+");
+ dbg = fopen(DEBUG_HDA_FILE, "w+");
#endif
sc = calloc(1, sizeof(*sc));
diff --git a/usr.sbin/bhyve/pci_hda.h b/usr.sbin/bhyve/pci_hda.h
index 8b24afac4771..ce502278bdbf 100644
--- a/usr.sbin/bhyve/pci_hda.h
+++ b/usr.sbin/bhyve/pci_hda.h
@@ -51,6 +51,9 @@ extern FILE *dbg;
#define DPRINTF(fmt, arg...) \
do {fprintf(dbg, "%s-%d: " fmt "\n", __func__, __LINE__, ##arg); \
fflush(dbg); } while (0)
+#ifndef DEBUG_HDA_FILE
+#define DEBUG_HDA_FILE "/tmp/bhyve_hda.log"
+#endif
#else
#define DPRINTF(fmt, arg...)
#endif