Received: from eggs.gnu.org ([2001:4830:134:3::10]:57410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkIK2-0005pe-5S for qemu-devel@nongnu.org; Wed, 14 Sep 2016 18:06:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkIK0-0001Z3-0Q for qemu-devel@nongnu.org; Wed, 14 Sep 2016 18:06:25 -0400 References: <1471625435-6190-1-git-send-email-kwolf@redhat.com> <1471625435-6190-9-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5adb51c7-9e53-f5bb-348c-103fd7d604ca@redhat.com> Date: Wed, 14 Sep 2016 17:06:15 -0500 MIME-Version: 1.0 In-Reply-To: <1471625435-6190-9-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Bgetg6wdp0Atm65fofDrnbw58AlX5MhV8" Subject: Re: [Qemu-devel] [PATCH 08/10] block: Accept device model name for blockdev-change-medium List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: mreitz@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Bgetg6wdp0Atm65fofDrnbw58AlX5MhV8 From: Eric Blake To: Kevin Wolf , qemu-block@nongnu.org Cc: mreitz@redhat.com, qemu-devel@nongnu.org Message-ID: <5adb51c7-9e53-f5bb-348c-103fd7d604ca@redhat.com> Subject: Re: [PATCH 08/10] block: Accept device model name for blockdev-change-medium References: <1471625435-6190-1-git-send-email-kwolf@redhat.com> <1471625435-6190-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1471625435-6190-9-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > This converts blockdev-change-medium to accept a qdev device name. >=20 > Signed-off-by: Kevin Wolf > --- > @@ -2608,7 +2612,7 @@ void qmp_blockdev_change_medium(const char *devic= e, const char *filename, > error_free(err); > err =3D NULL; > =20 > - 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= =2E8) > +# Missing #optional markers, and deprecation notice. > +++ b/qmp.c > @@ -446,8 +446,8 @@ void qmp_change(const char *device, const char *tar= get, > if (strcmp(device, "vnc") =3D=3D 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Bgetg6wdp0Atm65fofDrnbw58AlX5MhV8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX2cnXAAoJEKeha0olJ0NqDWYH/Ri+W7WFV7sJqnktAa0BSTkh meKhBZfAOKHTSYVdurzmwBx7WTiPge0U4hVY+P9E+1SF2rECzJeA4LZe9E0064L4 JnLGAqpY4xnEhYRewh04rpahMIiAmBX+Ilr67alD9D+eGmhx4Q5HCld2DUxZTm3e rDHWfCYBu5mBZTOCAxmLCbywF6/zPQ19qU5p8sjeZWAPE3n2fCLFBeZquN9DQkDB oXzAT3EKBiUE3CwPcNmj7GQb6aoqhn8nj8dQbKr3j5+YMEo0SgLEjv/DGGzFR+YA pvKZ0v6E3FaVf7wVPa2YY91sSEsWvoNODrTbZT8D9N8Ke6KDRlme8WTfZME9cME= =5+o4 -----END PGP SIGNATURE----- --Bgetg6wdp0Atm65fofDrnbw58AlX5MhV8--