From: Eric Blake <ebl...@redhat.com> 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-sta...@nongnu.org Signed-off-by: Eric Blake <ebl...@redhat.com> Message-Id: <20170120230359.4244-1-ebl...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- hmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hmp.c b/hmp.c index 2bc4f06..0c80596 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"), -- 2.9.3