]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Don't fail startup/attach for IOThreads if no JSON
authorJohn Ferlan <jferlan@redhat.com>
Wed, 17 Sep 2014 18:43:12 +0000 (14:43 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 18 Sep 2014 10:24:49 +0000 (06:24 -0400)
If the qemu being used doesn't support JSON, then querying for IOThread
data would fail. In that case, ensure the *iothreads is NULL and return 0
as the count of iothreads available.

src/qemu/qemu_monitor.c

index 8927dbbab7e662f18bbeb06d820e076ef7edda96..10f51c5c3aceb1880183b28b4f8fd9eed684f7eb 100644 (file)
@@ -4112,10 +4112,10 @@ qemuMonitorGetIOThreads(qemuMonitorPtr mon,
         return -1;
     }
 
+    /* Requires JSON to make the query */
     if (!mon->json) {
-        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                       _("JSON monitor is required"));
-        return -1;
+        *iothreads = NULL;
+        return 0;
     }
 
     return qemuMonitorJSONGetIOThreads(mon, iothreads);