qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC V3 5/7] qmp: Allow block_resize to manipulate bs g


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC V3 5/7] qmp: Allow block_resize to manipulate bs graph nodes.
Date: Wed, 04 Dec 2013 17:01:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 12/03/2013 06:26 AM, Benoît Canet wrote:
> Signed-off-by: Benoit Canet <address@hidden>
> ---
>  blockdev.c       | 13 +++++++++----
>  hmp.c            |  2 +-
>  qapi-schema.json | 10 ++++++++--
>  qmp-commands.hx  |  3 ++-
>  4 files changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/blockdev.c b/blockdev.c
> index aab370f..e314d62 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1676,14 +1676,19 @@ int do_drive_del(Monitor *mon, const QDict *qdict, 
> QObject **ret_data)
>      return 0;
>  }
>  
> -void qmp_block_resize(const char *device, int64_t size, Error **errp)
> +void qmp_block_resize(bool has_device, const char * device,
> +                      bool has_node_name, const char * node_name,

More style issues (I'll quit pointing them out).

> +++ b/hmp.c
> @@ -892,7 +892,7 @@ void hmp_block_resize(Monitor *mon, const QDict *qdict)
>      int64_t size = qdict_get_int(qdict, "size");
>      Error *errp = NULL;
>  
> -    qmp_block_resize(device, size, &errp);
> +    qmp_block_resize(true, device, false, NULL, size, &errp);

Again, is the decision to hide this from HMP intentional?  I can live
with that, but it's probably worth documenting in the commit message.

>  #
> -# @device:  the name of the device to get the image resized
> +# Either @device or @node-name must be set but not both.
> +#
> +# @device: #optional the name of the device to get the image resized
> +#
> +# @node-name: #optional graph node name to get the image resized (Since 1.8)

2.0

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]