qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/10] block: Accept device model name for block


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 08/10] block: Accept device model name for blockdev-change-medium
Date: Wed, 14 Sep 2016 17:06:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 08/19/2016 11:50 AM, Kevin Wolf wrote:
> In order to remove the necessity to use BlockBackend names in the
> external API, we want to allow qdev device names in all device related
> commands.
> 
> This converts blockdev-change-medium to accept a qdev device name.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---

> @@ -2608,7 +2612,7 @@ void qmp_blockdev_change_medium(const char *device, 
> const char *filename,
>      error_free(err);
>      err = NULL;
>  
> -    qmp_x_blockdev_remove_medium(true, device, false, NULL, errp);
> +    qmp_x_blockdev_remove_medium(has_device, device, has_id, id, errp);

More possible churn based on the decisions on 5-6/10.

> +++ b/qapi/block-core.json
> @@ -2425,6 +2425,8 @@
>  #
>  # @device:          block device name
>  #
> +# @id:              the name or QOM path of the guest device (since: 2.8)
> +#

Missing #optional markers, and deprecation notice.

> +++ b/qmp.c
> @@ -446,8 +446,8 @@ void qmp_change(const char *device, const char *target,
>      if (strcmp(device, "vnc") == 0) {
>          qmp_change_vnc(target, has_arg, arg, errp);
>      } else {
> -        qmp_blockdev_change_medium(device, target, has_arg, arg, false, 0,
> -                                   errp);
> +        qmp_blockdev_change_medium(true, device, false, NULL, target,
> +                                   has_arg, arg, false, 0, errp);

Side note - it would be nice to get defaults into QAPI already, so we
can reduce the number of these has_FOO parameters.  But not your series'
problem.

-- 
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]