From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48170 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHlVQ-0002nL-JL for qemu-devel@nongnu.org; Thu, 27 May 2010 18:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHlQc-0001h8-Pk for qemu-devel@nongnu.org; Thu, 27 May 2010 18:19:51 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:36233) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHlQc-0001gt-EX for qemu-devel@nongnu.org; Thu, 27 May 2010 18:19:50 -0400 Message-ID: <4BFEF004.90800@web.de> Date: Fri, 28 May 2010 00:19:48 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20100527163618.2fcd95a8@redhat.com> In-Reply-To: <20100527163618.2fcd95a8@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5BFA1215FED9A06CB60C80A9" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH v3 06/17] qdev: Allow device specification by qtree path for device_del List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Blue Swirl , Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5BFA1215FED9A06CB60C80A9 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Luiz Capitulino wrote: > On Sun, 23 May 2010 12:59:19 +0200 > Jan Kiszka wrote: >=20 >> From: Jan Kiszka >> >> Allow to specify the device to be removed via device_del not only by I= D >> but also by its full or abbreviated qtree path. For this purpose, >> qdev_find is introduced which combines walking the qtree with searchin= g >> for device IDs if required. >=20 > [...] >=20 >> Arguments: >> =20 >> -- "id": the device's ID (json-string) >> +- "path": the device's qtree path or unique ID (json-string) >> =20 >> Example: >> =20 >> --> { "execute": "device_del", "arguments": { "id": "net1" } } >> +-> { "execute": "device_del", "arguments": { "path": "net1" } } >=20 > Doesn't seem like a good change to me, besides being incompatible[1] w= e > shouldn't overload arguments this way in QMP as overloading leads to > interface degradation (harder to use, understand, maintain). It's not overloaded, think of an ID as a (weak) symbolic link in the qtree filesystem. The advantage of basing everything on top of full or abbreviated qtree paths is that IDs are not always assigned, paths are. >=20 > Maybe we could have both arguments as optional, but one must be passed= =2E This would at least require some way to keep the proposed unified path specification for the human monitor (having separate arguments there is really unhandy). >=20 > [1] It's 'legal' to break the protocol before 0.13, but this has to be > coordinated with libvirt so we should have a good reason to do this= >=20 >> <- { "return": {} } >> =20 >> EQMP >=20 Jan --------------enig5BFA1215FED9A06CB60C80A9 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.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkv+8AQACgkQitSsb3rl5xQlPQCeNU9dZu2Xaa/GSO7tanRJV8Vb fWQAn08HgqongUZ2pm/2mVVBvN9ou0GV =UeMD -----END PGP SIGNATURE----- --------------enig5BFA1215FED9A06CB60C80A9--