bhyve: Add DEBUG_HDA_FILE define to specify location of debug output
Reviewed by: corvink Approved by: corvink Differential Revision: https://reviews.freebsd.org/D39826
This commit is contained in:
parent
03d3124629
commit
014e03411f
|
@ -324,7 +324,7 @@ hda_init(nvlist_t *nvl)
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
#if DEBUG_HDA == 1
|
#if DEBUG_HDA == 1
|
||||||
dbg = fopen("/tmp/bhyve_hda.log", "w+");
|
dbg = fopen(DEBUG_HDA_FILE, "w+");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sc = calloc(1, sizeof(*sc));
|
sc = calloc(1, sizeof(*sc));
|
||||||
|
|
|
@ -51,6 +51,9 @@ extern FILE *dbg;
|
||||||
#define DPRINTF(fmt, arg...) \
|
#define DPRINTF(fmt, arg...) \
|
||||||
do {fprintf(dbg, "%s-%d: " fmt "\n", __func__, __LINE__, ##arg); \
|
do {fprintf(dbg, "%s-%d: " fmt "\n", __func__, __LINE__, ##arg); \
|
||||||
fflush(dbg); } while (0)
|
fflush(dbg); } while (0)
|
||||||
|
#ifndef DEBUG_HDA_FILE
|
||||||
|
#define DEBUG_HDA_FILE "/tmp/bhyve_hda.log"
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define DPRINTF(fmt, arg...)
|
#define DPRINTF(fmt, arg...)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue