render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
9119d9
From 3ddcdff13e730d59851f99ce0135f499c5188495 Mon Sep 17 00:00:00 2001
9119d9
Message-Id: <3ddcdff13e730d59851f99ce0135f499c5188495@dist-git>
9119d9
From: John Ferlan <jferlan@redhat.com>
9119d9
Date: Thu, 18 Sep 2014 09:30:02 -0400
9119d9
Subject: [PATCH] qemu: Don't fail startup/attach for IOThreads if no JSON
9119d9
9119d9
https://bugzilla.redhat.com/show_bug.cgi?id=1101574
9119d9
9119d9
If the qemu being used doesn't support JSON, then querying for IOThread
9119d9
data would fail. In that case, ensure the *iothreads is NULL and return 0
9119d9
as the count of iothreads available.
9119d9
9119d9
(cherry picked from commit 15ee3c2511157a7dfd3516e633057ce26b9fbd62)
9119d9
Signed-off-by: John Ferlan <jferlan@redhat.com>
9119d9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
9119d9
---
9119d9
 src/qemu/qemu_monitor.c | 6 +++---
9119d9
 1 file changed, 3 insertions(+), 3 deletions(-)
9119d9
9119d9
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
9119d9
index 00f1d38..db2fe71 100644
9119d9
--- a/src/qemu/qemu_monitor.c
9119d9
+++ b/src/qemu/qemu_monitor.c
9119d9
@@ -4113,10 +4113,10 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon,
9119d9
         return -1;
9119d9
     }
9119d9
 
9119d9
+    /* Requires JSON to make the query */
9119d9
     if (!mon->json) {
9119d9
-        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
9119d9
-                       _("JSON monitor is required"));
9119d9
-        return -1;
9119d9
+        *iothreads = NULL;
9119d9
+        return 0;
9119d9
     }
9119d9
 
9119d9
     return qemuMonitorJSONGetIOThreads(mon, iothreads);
9119d9
-- 
9119d9
2.1.0
9119d9