Received: from eggs.gnu.org ([2001:4830:134:3::10]:55737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhFKh-000215-6A for qemu-devel@nongnu.org; Mon, 05 May 2014 05:37:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhFKb-0004Iu-JJ for qemu-devel@nongnu.org; Mon, 05 May 2014 05:37:11 -0400 Message-ID: <53675BBF.5000207@suse.de> Date: Mon, 05 May 2014 11:37:03 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1398725186-8202-1-git-send-email-kroosec@gmail.com> In-Reply-To: <1398725186-8202-1-git-send-email-kroosec@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] qmp: Report path ambiguity error. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hani Benhabiles , Michael Tokarev Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, lcapitulino@redhat.com Am 29.04.2014 00:46, schrieb Hani Benhabiles: > Signed-off-by: Hani Benhabiles > Suggested-by: Andreas F=C3=A4rber > --- > qmp.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/qmp.c b/qmp.c > index 74107be..0d49abf 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -199,7 +199,10 @@ ObjectPropertyInfoList *qmp_qom_list(const char *p= ath, Error **errp) > ObjectProperty *prop; > =20 > obj =3D object_resolve_path(path, &ambiguous); > - if (obj =3D=3D NULL) { > + if (ambiguous) { > + error_setg(errp, "Path '%s' is ambiguous", path); > + return NULL; > + } else if (obj =3D=3D NULL) { > error_set(errp, QERR_DEVICE_NOT_FOUND, path); > return NULL; > } This is not quite what I suggested, but assuming bool ambiguous gets initialized to false, this variant should work too. Hani, please note that your Signed-off-by should be the last line in the commit message. No need to resend just for that. I'll try to dig out the code for a proper Rb later. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg