]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: monitor: Fix error message and comment when getting cpu info
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Mar 2014 09:32:47 +0000 (10:32 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 4 Mar 2014 10:17:52 +0000 (11:17 +0100)
In qemuMonitorJSONExtractCPUInfo an error message hinted on missing
character device data which is wrong.

Also a comment states that only qemu-kvm tree includes the thread_id
field. This is no longer true.

src/qemu/qemu_monitor_json.c

index 5e825acb329b499bac6178bc2935366d0c5bad44..9a5b8121e1e262eba820e1cc909b8c85d0052b4e 100644 (file)
@@ -1220,13 +1220,13 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
         int thread;
         if (!entry) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("character device information was missing array element"));
+                           _("cpu information was missing an array element"));
             goto cleanup;
         }
 
         if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
-            /* Only qemu-kvm tree includs thread_id, so treat this as
-               non-fatal, simply returning no data */
+            /* Some older qemu versions don't report the thread_id,
+             * so treat this as non-fatal, simply returning no data */
             ret = 0;
             goto cleanup;
         }