From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFVYR-0002yp-R6 for qemu-devel@nongnu.org; Fri, 30 Aug 2013 16:44:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFVYJ-00082q-1f for qemu-devel@nongnu.org; Fri, 30 Aug 2013 16:44:27 -0400 Received: from qmta02.emeryville.ca.mail.comcast.net ([76.96.30.24]:33194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFVYI-00082k-Q5 for qemu-devel@nongnu.org; Fri, 30 Aug 2013 16:44:18 -0400 From: Eric Blake Date: Fri, 30 Aug 2013 14:44:11 -0600 Message-Id: <1377895451-6603-1-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: benoit@irqsave.net, lcapitulino@redhat.com Per the qapi schema, block_set_io_throttle takes most arguments as ints, not strings. * qmp-commands.hx (block_set_io_throttle): Use correct type. Fix whitespace and a copy-paste bug in the process. Signed-off-by: Eric Blake --- v2: also touch up the doc comments qmp-commands.hx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index bb09e72..8a8f342 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1402,22 +1402,22 @@ Change I/O throttle limits for a block drive. Arguments: - "device": device name (json-string) -- "bps": total throughput limit in bytes per second(json-int) -- "bps_rd": read throughput limit in bytes per second(json-int) -- "bps_wr": read throughput limit in bytes per second(json-int) -- "iops": total I/O operations per second(json-int) -- "iops_rd": read I/O operations per second(json-int) -- "iops_wr": write I/O operations per second(json-int) +- "bps": total throughput limit in bytes per second (json-int) +- "bps_rd": read throughput limit in bytes per second (json-int) +- "bps_wr": write throughput limit in bytes per second (json-int) +- "iops": total I/O operations per second (json-int) +- "iops_rd": read I/O operations per second (json-int) +- "iops_wr": write I/O operations per second (json-int) Example: -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0", - "bps": "1000000", - "bps_rd": "0", - "bps_wr": "0", - "iops": "0", - "iops_rd": "0", - "iops_wr": "0" } } + "bps": 1000000, + "bps_rd": 0, + "bps_wr": 0, + "iops": 0, + "iops_rd": 0, + "iops_wr": 0 } } <- { "return": {} } EQMP @@ -1791,7 +1791,7 @@ Each json-object contain the following: - "vm-state-size": size of the VM state in bytes (json-int) - "date-sec": UTC date of the snapshot in seconds (json-int) - "date-nsec": fractional part in nanoseconds to be used with - date-sec(json-int) + date-sec (json-int) - "vm-clock-sec": VM clock relative to boot in seconds (json-int) - "vm-clock-nsec": fractional part in nanoseconds to be used -- 1.8.3.1