[libvirt] [PATCH 2/2] qemu: Fix device name comparison in qemuMonitorJSONBlockIoThrottleInfo()

Stefan Hajnoczi stefanha at redhat.com
Thu Nov 1 17:20:56 UTC 2012


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 <stefanha at redhat.com>
---
 src/qemu/qemu_monitor_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e0faacf..2adc537 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;
-- 
1.7.12.1




More information about the libvir-list mailing list