From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUzcA-0000Uv-25 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 12:01:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUzc5-0004B6-W0 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 12:01:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUzc5-0004Ax-P7 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 12:01:17 -0400 References: <1440689864-32127-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <55DF3448.5070302@redhat.com> Date: Thu, 27 Aug 2015 10:01:12 -0600 MIME-Version: 1.0 In-Reply-To: <1440689864-32127-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Dmg2GH18u93NUARpH8qp7XhfMJ8Bm8QJN" Subject: Re: [Qemu-devel] [PATCH] monitor: allow object_del & device_del to accept QOM paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Programmingkid , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Dmg2GH18u93NUARpH8qp7XhfMJ8Bm8QJN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/27/2015 09:37 AM, Daniel P. Berrange wrote: > Currently both object_del and device_del require that the > client provide the object/device short ID. While user > creatable objects require an ID to be provided at time of > creation, qdev devices may be created without giving an > ID. The only unique identifier they would then have is the > QOM object path. >=20 > Allowing device_del to accept an object path ensures all > devices are deletable regardless of whether they have an > ID. >=20 > (qemu) device_add usb-mouse > (qemu) qom-list /machine/peripheral-anon > device[0] (child) > type (string) > (qemu) device_del /machine/peripheral-anon/device[0] >=20 > Although objects require an ID to be provided upfront, > there may be cases where the client would prefer to > use QOM paths when deleting. >=20 > Signed-off-by: Daniel P. Berrange > --- > hmp-commands.hx | 6 ++++-- > qdev-monitor.c | 14 +++++++++----- > qmp-commands.hx | 17 +++++++++++++---- > qmp.c | 10 +++++++--- > 4 files changed, 33 insertions(+), 14 deletions(-) Might also want to touch qapi-schema.json for consistent documentation of the @id parameter (our goal is for qmp-commands.hx to go away some day; and while we can merge contents at that time, it's nicer to keep them in sync now) Reviewed-by: Eric Blake