From: Daniel P. Berrange Date: Mon, 15 Feb 2010 14:41:50 +0000 (+0000) Subject: Treat missing QEMU 'thread_id' as non-fatal in JSON monitor X-Git-Tag: v0.7.7~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=535db41be8c18c369f43cddebd5071cc8d155d58;p=thirdparty%2Flibvirt.git Treat missing QEMU 'thread_id' as non-fatal in JSON monitor 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 --- diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9875f38bac..49e0370344 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; }