From: Eric Blake Date: Fri, 20 Jan 2017 23:03:59 +0000 (-0600) Subject: hmp: fix block_set_io_throttle X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3f35c3b166c18043596768448e5d91b5d52f8353;p=qmiga%2Fqemu.git hmp: fix block_set_io_throttle Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'" CC: qemu-stable@nongnu.org Signed-off-by: Eric Blake Message-Id: <20170120230359.4244-1-eblake@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- diff --git a/hmp.c b/hmp.c index 2bc4f062bb..0c805967e6 100644 --- a/hmp.c +++ b/hmp.c @@ -1552,6 +1552,7 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict) { Error *err = NULL; BlockIOThrottle throttle = { + .has_device = true, .device = (char *) qdict_get_str(qdict, "device"), .bps = qdict_get_int(qdict, "bps"), .bps_rd = qdict_get_int(qdict, "bps_rd"),