summaryrefslogtreecommitdiffstats
path: root/pcilib/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/debug.c')
-rw-r--r--pcilib/debug.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/pcilib/debug.c b/pcilib/debug.c
new file mode 100644
index 0000000..f07e1e6
--- /dev/null
+++ b/pcilib/debug.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "error.h"
+
+void pcilib_debug_message(const char *function, const char *file, int line, const char *format, ...) {
+ va_list va;
+
+ if (!getenv(function)) return;
+
+ va_start(va, format);
+ pcilib_log_vmessage(file, line, PCILIB_LOG_DEBUG, format, va);
+ va_end(va);
+}
+