From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmz24-0006Yk-FG for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:07:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmz1z-000462-U9 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:06:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmz1z-00045n-Ok for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:06:55 -0400 Date: Thu, 22 Sep 2016 09:06:51 +0100 From: "Daniel P. Berrange" Message-ID: <20160922080651.GD352@redhat.com> Reply-To: "Daniel P. Berrange" References: <20160921201018.20957-1-marcandre.lureau@redhat.com> <20160921201018.20957-4-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160921201018.20957-4-marcandre.lureau@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 3/4] qapi: return a 'missing parameter' error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: qemu-devel@nongnu.org, berto@igalia.com, armbru@redhat.com On Thu, Sep 22, 2016 at 12:10:17AM +0400, Marc-Andr=C3=A9 Lureau wrote: > The 'old' dispatch code returned a QERR_MISSING_PARAMETER for missing > parameters, but the qapi qmp_dispatch() code uses > QERR_INVALID_PARAMETER_TYPE. >=20 > Improve qapi code to return QERR_INVALID_PARAMETER_TYPE where > appropriate. Surely this is meant to say 'return QERR_MISSING_PARAMETER', as QERR_INVALID_PARAMETER_TYPE is what its already returning. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > Reviewed-by: Alberto Garcia > --- > qapi/qmp-input-visitor.c | 73 +++++++++++++++++++++++++++++++++++++---= -------- > 1 file changed, 56 insertions(+), 17 deletions(-) There's a pretty detailed unit test for this visitor, which should be further extended to cover this new behaviour. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|