Corresponds to existing qemu_log_vprintf() but uses a mask.

Signed-off-by: Andreas Färber <[email protected]>
---
 include/qemu/log.h |    8 ++++++++
 1 Datei geändert, 8 Zeilen hinzugefügt(+)

diff --git a/include/qemu/log.h b/include/qemu/log.h
index 58f69cb..4bfa60c 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -64,6 +64,14 @@ qemu_log_vprintf(const char *fmt, va_list va)
  */
 void GCC_FMT_ATTR(2, 3) qemu_log_mask(int mask, const char *fmt, ...);
 
+static inline void GCC_FMT_ATTR(2, 0)
+qemu_log_mask_vprintf(int mask, const char *fmt, va_list va)
+{
+    if ((qemu_loglevel & mask) && qemu_logfile) {
+        vfprintf(qemu_logfile, fmt, va);
+    }
+}
+
 
 /* Special cases: */
 
-- 
1.7.10.4


Reply via email to