diff options
author | Eric Blake <eblake@redhat.com> | 2017-01-20 17:03:59 -0600 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-02-21 18:29:00 +0000 |
commit | 3f35c3b166c18043596768448e5d91b5d52f8353 (patch) | |
tree | 4834d9db69bcabe2f70384d543fcab107774f9e7 /hmp.c | |
parent | 796b288f7be875045670f963ce99991b3c8e96ac (diff) | |
download | qemu-3f35c3b166c18043596768448e5d91b5d52f8353.zip qemu-3f35c3b166c18043596768448e5d91b5d52f8353.tar.gz qemu-3f35c3b166c18043596768448e5d91b5d52f8353.tar.bz2 |
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 <eblake@redhat.com>
Message-Id: <20170120230359.4244-1-eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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"), |