* [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples
@ 2013-08-30 20:44 Eric Blake
2013-08-30 21:47 ` Benoît Canet
2013-09-01 15:47 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Eric Blake @ 2013-08-30 20:44 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: benoit, lcapitulino
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 <eblake@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples
2013-08-30 20:44 [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples Eric Blake
@ 2013-08-30 21:47 ` Benoît Canet
2013-09-01 15:47 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Benoît Canet @ 2013-08-30 21:47 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-trivial, qemu-devel, lcapitulino
Le Friday 30 Aug 2013 à 14:44:11 (-0600), Eric Blake a écrit :
> 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 <eblake@redhat.com>
> ---
>
> 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
>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCHv2] qmp: fix integer usage in examples
2013-08-30 20:44 [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples Eric Blake
2013-08-30 21:47 ` Benoît Canet
@ 2013-09-01 15:47 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2013-09-01 15:47 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-trivial, lcapitulino, qemu-devel, benoit
31.08.2013 00:44, Eric Blake wrote:
> 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.
Thanks, applied to the trivial-patches queue.
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-01 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30 20:44 [Qemu-devel] [PATCHv2] qmp: fix integer usage in examples Eric Blake
2013-08-30 21:47 ` Benoît Canet
2013-09-01 15:47 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).