All of lore.kernel.org
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, armbru@redhat.com,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH 11/12] qmp: update qmp_query_spice fallback
Date: Thu, 23 Jun 2016 02:08:08 +0200	[thread overview]
Message-ID: <20160623000809.4522-12-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20160623000809.4522-1-marcandre.lureau@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

There are a few commands that are undef #ifdef conditions in
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é Lureau <marcandre.lureau@redhat.com>
---
 monitor.c | 14 ++++++++++++++
 qmp.c     | 16 ----------------
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/monitor.c b/monitor.c
index dd77701..bddf2ca 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4006,6 +4006,20 @@ QemuOptsList qemu_mon_opts = {
     },
 };
 
+/*
+ * 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;
+};
+#endif
+
 #ifndef TARGET_I386
 void qmp_rtc_reset_reinjection(Error **errp)
 {
diff --git a/qmp.c b/qmp.c
index b6d531e..884d1ab 100644
--- a/qmp.c
+++ b/qmp.c
@@ -161,22 +161,6 @@ VncInfo2List *qmp_query_vnc_servers(Error **errp)
 };
 #endif
 
-#ifndef CONFIG_SPICE
-/*
- * qmp-commands.hx ensures that QMP command query-spice exists only
- * #ifdef CONFIG_SPICE.  Necessary for an accurate query-commands
- * result.  However, the QAPI schema is blissfully unaware of that,
- * and the QAPI code generator happily generates a dead
- * qmp_marshal_query_spice() that calls qmp_query_spice().  Provide it
- * one, or else linking fails.  FIXME Educate the QAPI schema on
- * CONFIG_SPICE.
- */
-SpiceInfo *qmp_query_spice(Error **errp)
-{
-    abort();
-};
-#endif
-
 void qmp_cont(Error **errp)
 {
     Error *local_err = NULL;
-- 
2.9.0

  parent reply	other threads:[~2016-06-23  0:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  0:07 [Qemu-devel] [PATCH 00/12] qapi: remove the 'middle' mode marcandre.lureau
2016-06-23  0:07 ` [Qemu-devel] [PATCH 01/12] qapi-schema: use generated marshaller for 'qmp_capabilities' marcandre.lureau
2016-06-23 22:41   ` Eric Blake
2016-06-23  0:07 ` [Qemu-devel] [PATCH 02/12] qapi-schema: add 'device_add' marcandre.lureau
2016-06-24  3:52   ` Eric Blake
2016-06-23  0:08 ` [Qemu-devel] [PATCH 03/12] monitor: register gen:false commands manually marcandre.lureau
2016-06-24  4:02   ` Eric Blake
2016-06-23  0:08 ` [Qemu-devel] [PATCH 04/12] monitor: remove usage of generated marshal functions marcandre.lureau
2016-06-24  4:23   ` Eric Blake
2016-06-24 14:14     ` Marc-André Lureau
2016-06-24 14:59       ` Eric Blake
2016-06-23  0:08 ` [Qemu-devel] [PATCH 05/12] monitor: register the qapi generated commands marcandre.lureau
2016-06-23  4:38   ` Paolo Bonzini
2016-06-23  9:02     ` Marc-André Lureau
2016-06-24  4:31   ` Eric Blake
2016-06-24 14:17     ` Marc-André Lureau
2016-06-23  0:08 ` [Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new marcandre.lureau
2016-06-24  4:39   ` Eric Blake
2016-06-24 14:20     ` Marc-André Lureau
2016-06-24 15:04       ` Eric Blake
2016-06-23  0:08 ` [Qemu-devel] [PATCH 07/12] monitor: implement 'qmp_query_commands' without qmp_cmds marcandre.lureau
2016-06-23  0:08 ` [Qemu-devel] [PATCH 08/12] build-sys: remove qmp-commands-old.h marcandre.lureau
2016-06-23  0:08 ` [Qemu-devel] [PATCH 09/12] qapi: remove the "middle" mode marcandre.lureau
2016-06-23  0:08 ` [Qemu-devel] [PATCH 10/12] monitor: use qmp_dispatch() marcandre.lureau
2016-06-23  0:08 ` marcandre.lureau [this message]
2016-06-23  0:08 ` [Qemu-devel] [PATCH 12/12] Drop qmp-commands.hx marcandre.lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160623000809.4522-12-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.