diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 07b0e745b0b..4fc19c52b72 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 8b24afac477..ce502278bdb 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