@@ -33,14 +33,15 @@
#define ERR_PREFIX "vfio error: %s: "
#define WARN_PREFIX "vfio warning: %s: "
-/*#define DEBUG_VFIO*/
-#ifdef DEBUG_VFIO
-#define DPRINTF(fmt, ...) \
- do { fprintf(stderr, "vfio: " fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
+#ifndef DEBUG_VFIO
+#define DEBUG_VFIO 0
+#endif
+
+#define DPRINTF(fmt, ...) do { \
+ if (DEBUG_VFIO) { \
+ fprintf(stderr, "vfio: " fmt, ## __VA_ARGS__); \
+ } \
+} while (0);
enum {
VFIO_DEVICE_TYPE_PCI = 0,