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 <kw...@redhat.com> > ---
> @@ -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
signature.asc
Description: OpenPGP digital signature