]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Treat missing QEMU 'thread_id' as non-fatal in JSON monitor
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Feb 2010 14:41:50 +0000 (14:41 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 16 Feb 2010 14:33:34 +0000 (14:33 +0000)
The plain QEMU tree does not include 'thread_id' in the JSON
output. Thus we need to treat it as non-fatal if missing.

* src/qemu/qemu_monitor_json.c: Treat missing thread_id as non-fatal

src/qemu/qemu_monitor_json.c

index 9875f38bac85bfd0d13d5a4e40a92ea6da3a5581..49e037034463c800de11b857cb059c01e5e09e55 100644 (file)
@@ -630,8 +630,9 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
         }
 
         if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
-            qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                            _("cpu information was missing thread ID"));
+            /* Only qemu-kvm tree includs thread_id, so treat this as
+               non-fatal, simply returning no data */
+            ret = 0;
             goto cleanup;
         }