From: Stefan Hajnoczi Date: Thu, 1 Nov 2012 17:20:56 +0000 (+0100) Subject: qemu: Fix name comparison in qemuMonitorJSONBlockIoThrottleInfo() X-Git-Tag: v1.0.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23d47b33a2f8b524c32d556d6d55a7ccb0c5903a;p=thirdparty%2Flibvirt.git qemu: Fix name comparison in qemuMonitorJSONBlockIoThrottleInfo() The string comparison logic was inverted and matched the first drive that does *not* have the name we search for. Signed-off-by: Stefan Hajnoczi --- diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index af1227760f..8a31466e17 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -3739,7 +3739,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result, goto cleanup; } - if (STREQ(current_dev, device)) + if (STRNEQ(current_dev, device)) continue; found = true;