]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Remove unsupported function check for 'block_resize'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Aug 2018 07:22:55 +0000 (09:22 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Aug 2018 13:46:05 +0000 (15:46 +0200)
QEMU supports 'block_resize' since 0.14 so we don't need to do explicit
checking. Additionally the caller did not use the different value at
all.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c

index ed6caf4c2f8fe0a09b771aff6febc1fbf5d5a370..5b229090d68b1329069bd6ab2b54b272cc1d99ea 100644 (file)
@@ -2550,8 +2550,6 @@ qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
 }
 
 
-/* Return 0 on success, -1 on failure, or -2 if not supported.  Size
- * is in bytes.  */
 int qemuMonitorJSONBlockResize(qemuMonitorPtr mon,
                                const char *device,
                                unsigned long long size)
@@ -2570,11 +2568,6 @@ int qemuMonitorJSONBlockResize(qemuMonitorPtr mon,
     if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
         goto cleanup;
 
-    if (qemuMonitorJSONHasError(reply, "CommandNotFound")) {
-        ret = -2;
-        goto cleanup;
-    }
-
     if (qemuMonitorJSONCheckError(cmd, reply) < 0)
         goto cleanup;