From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVgGN-0002H0-As for qemu-devel@nongnu.org; Fri, 05 Aug 2016 10:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVgGM-0006lx-Ap for qemu-devel@nongnu.org; Fri, 05 Aug 2016 10:38:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVgGM-0006lo-4k for qemu-devel@nongnu.org; Fri, 05 Aug 2016 10:38:14 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80BFE4E326 for ; Fri, 5 Aug 2016 14:38:13 +0000 (UTC) From: Markus Armbruster References: <20160721140030.28383-1-marcandre.lureau@redhat.com> <20160721140030.28383-12-marcandre.lureau@redhat.com> <87eg63tju2.fsf@dusky.pond.sub.org> <311369298.1355161.1470404588801.JavaMail.zimbra@redhat.com> Date: Fri, 05 Aug 2016 16:38:11 +0200 In-Reply-To: <311369298.1355161.1470404588801.JavaMail.zimbra@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Fri, 5 Aug 2016 09:43:08 -0400 (EDT)") Message-ID: <87wpjvp9gs.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 11/12] qmp: update qmp_query_spice fallback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: marcandre lureau , qemu-devel@nongnu.org Marc-Andr=C3=A9 Lureau writes: > ----- Original Message ----- >> marcandre.lureau@redhat.com writes: >>=20 >> > From: Marc-Andr=C3=A9 Lureau >> > >> > There are a few commands that are undef #ifdef conditions in >>=20 >> under #ifdef >>=20 >> > qmp-commands.hx. Move all the qmp_query_spice fallback in the same >> > location, return an error and update the comment. >> > >> > Signed-off-by: Marc-Andr=C3=A9 Lureau >> > --- >> > monitor.c | 14 ++++++++++++++ >> > qmp.c | 16 ---------------- >> > 2 files changed, 14 insertions(+), 16 deletions(-) >> > >> > diff --git a/monitor.c b/monitor.c >> > index c87089f..46966d5 100644 >> > --- a/monitor.c >> > +++ b/monitor.c >> > @@ -4048,6 +4048,20 @@ QemuOptsList qemu_mon_opts =3D { >> > }, >> > }; >> >=20=20 >> > +/* >> > + * the QAPI schema is blissfully unaware #ifdef FOO commands, and the >> > + * QAPI code generator happily generates a dead qmp_marshal_foo_cmd() >> > + * that calls qmp_foo_cmd(). Provide it one, or else linking fails. >> > + * FIXME Educate the QAPI schema on #ifdef commands. >> > + */ >> > +#ifndef CONFIG_SPICE >> > +SpiceInfo *qmp_query_spice(Error **errp) >> > +{ >> > + error_setg(errp, QERR_FEATURE_DISABLED, "spice"); >> > + return NULL; >>=20 >> Why do you change from abort() to error_setg()? > > The rest of the commands do not abort. It sounds to easy to trigger, and = it's quite harmless to return an error instead. If you can trigger it, the comment is wrong to claim "dead". Can you trigger it before your series? If not, which commit makes it triggerable? [...]