[libvirt] [PATCH] Treat missing QEMU 'thread_id' as non-fatal in JSON monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 9875f38..49e0370 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -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;
         }
 
-- 
1.6.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]