dcavalca / rpms / qemu

Forked from rpms/qemu 11 months ago
Clone

Blame 0018-qxl-make-qxl_guest_bug-take-variable-arguments.patch

Justin M. Forbes fc5c27
>From 5c0219c6cef769a5748705d489376ea618486a17 Mon Sep 17 00:00:00 2001
Justin M. Forbes 13f703
From: Alon Levy <alevy@redhat.com>
Justin M. Forbes 13f703
Date: Wed, 6 Jul 2011 13:40:29 +0200
Justin M. Forbes fc5c27
Subject: [PATCH 18/28] qxl: make qxl_guest_bug take variable arguments
Justin M. Forbes 13f703
Justin M. Forbes 13f703
Signed-off-by: Alon Levy <alevy@redhat.com>
Justin M. Forbes 13f703
---
Justin M. Forbes 13f703
 hw/qxl.c |    9 +++++++--
Justin M. Forbes 13f703
 hw/qxl.h |    2 +-
Justin M. Forbes 13f703
 2 files changed, 8 insertions(+), 3 deletions(-)
Justin M. Forbes 13f703
Justin M. Forbes 13f703
diff --git a/hw/qxl.c b/hw/qxl.c
Justin M. Forbes 13f703
index 28c8b5d..c50eaf9 100644
Justin M. Forbes 13f703
--- a/hw/qxl.c
Justin M. Forbes 13f703
+++ b/hw/qxl.c
Justin M. Forbes 13f703
@@ -125,13 +125,18 @@ static void qxl_reset_memslots(PCIQXLDevice *d);
Justin M. Forbes 13f703
 static void qxl_reset_surfaces(PCIQXLDevice *d);
Justin M. Forbes 13f703
 static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
Justin M. Forbes 13f703
 
Justin M. Forbes 13f703
-void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg)
Justin M. Forbes 13f703
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
Justin M. Forbes 13f703
 {
Justin M. Forbes 13f703
 #if SPICE_INTERFACE_QXL_MINOR >= 1
Justin M. Forbes 13f703
     qxl_send_events(qxl, QXL_INTERRUPT_ERROR);
Justin M. Forbes 13f703
 #endif
Justin M. Forbes 13f703
     if (qxl->guestdebug) {
Justin M. Forbes 13f703
-        fprintf(stderr, "qxl-%d: guest bug: %s\n", qxl->id, msg);
Justin M. Forbes 13f703
+        va_list ap;
Justin M. Forbes 13f703
+        va_start(ap, msg);
Justin M. Forbes 13f703
+        fprintf(stderr, "qxl-%d: guest bug: ", qxl->id);
Justin M. Forbes 13f703
+        vfprintf(stderr, msg, ap);
Justin M. Forbes 13f703
+        fprintf(stderr, "\n");
Justin M. Forbes 13f703
+        va_end(ap);
Justin M. Forbes 13f703
     }
Justin M. Forbes 13f703
 }
Justin M. Forbes 13f703
 
Justin M. Forbes 13f703
diff --git a/hw/qxl.h b/hw/qxl.h
Justin M. Forbes 13f703
index 5db9aae..32ca5a0 100644
Justin M. Forbes 13f703
--- a/hw/qxl.h
Justin M. Forbes 13f703
+++ b/hw/qxl.h
Justin M. Forbes 13f703
@@ -99,7 +99,7 @@ typedef struct PCIQXLDevice {
Justin M. Forbes 13f703
 
Justin M. Forbes 13f703
 /* qxl.c */
Justin M. Forbes 13f703
 void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
Justin M. Forbes 13f703
-void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg);
Justin M. Forbes 13f703
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...);
Justin M. Forbes 13f703
 
Justin M. Forbes 13f703
 void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
Justin M. Forbes 13f703
                            struct QXLRect *area, struct QXLRect *dirty_rects,
Justin M. Forbes 13f703
-- 
Justin M. Forbes 13f703
1.7.5.1
Justin M. Forbes 13f703