From: Peter Krempa Date: Tue, 7 Aug 2018 07:22:55 +0000 (+0200) Subject: qemu: monitor: Remove unsupported function check for 'block_resize' X-Git-Tag: v4.7.0-rc1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa23ec24a1a1f0de658db9295b860d4c4963cd94;p=thirdparty%2Flibvirt.git qemu: monitor: Remove unsupported function check for 'block_resize' 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 Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index ed6caf4c2f..5b229090d6 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -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;