aboutsummaryrefslogtreecommitdiff
path: root/hw/qxl.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-07-20 12:20:56 +0300
committerGerd Hoffmann <kraxel@redhat.com>2011-08-01 12:43:49 +0200
commit7635392ce6844702b4e0faadfa558a6972e16098 (patch)
treeaeb0a382cbc8a42e87007763e34eafe784ab1189 /hw/qxl.c
parent2bce0400579f58ccb33d201cde9e63c39750faf4 (diff)
qxl: make qxl_guest_bug take variable arguments
Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/qxl.c')
-rw-r--r--hw/qxl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index 28c8b5d0d9..c50eaf9ac1 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -125,13 +125,18 @@ static void qxl_reset_memslots(PCIQXLDevice *d);
static void qxl_reset_surfaces(PCIQXLDevice *d);
static void qxl_ring_set_dirty(PCIQXLDevice *qxl);
-void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg)
+void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
{
#if SPICE_INTERFACE_QXL_MINOR >= 1
qxl_send_events(qxl, QXL_INTERRUPT_ERROR);
#endif
if (qxl->guestdebug) {
- fprintf(stderr, "qxl-%d: guest bug: %s\n", qxl->id, msg);
+ va_list ap;
+ va_start(ap, msg);
+ fprintf(stderr, "qxl-%d: guest bug: ", qxl->id);
+ vfprintf(stderr, msg, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
}
}