[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 11/15] qmp: update qmp_query_spice fallback
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v3 11/15] qmp: update qmp_query_spice fallback |
Date: |
Tue, 09 Aug 2016 14:38:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
address@hidden writes:
> From: Marc-André Lureau <address@hidden>
>
> The following "use qmp_dispatch()" commit will use the generated
> dispatch command table that is unaware of compile time conditionals.
>
> There are a few commands that are under #ifdef conditions in
> qmp-commands.hx. Move the qmp_query_spice fallback in the same location
> as the other fallbacks, return an error instead of abort() and update
> the comment.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> monitor.c | 14 ++++++++++++++
> qmp.c | 16 ----------------
> 2 files changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index e7549b1..5e7ae21 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4303,6 +4303,20 @@ QemuOptsList qemu_mon_opts = {
> },
> };
>
> +/*
> + * the QAPI schema is blissfully unaware #ifdef FOO commands, and the
> + * QAPI code generator happily generates a qmp_marshal_foo_cmd() that
> + * calls qmp_foo_cmd(). Provide it one, or else linking fails. FIXME
> + * Educate the QAPI schema on #ifdef commands.
Let's keep the FIXME on the same line as its text. Can touch up on commit.
> + */
> +#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;
- Re: [Qemu-devel] [PATCH v3 05/15] qapi: add 'export-marshal' command key, (continued)
[Qemu-devel] [PATCH v3 06/15] monitor: register the qapi generated commands, marcandre . lureau, 2016/08/08
[Qemu-devel] [PATCH v3 07/15] monitor: remove mhandler.cmd_new, marcandre . lureau, 2016/08/08
[Qemu-devel] [PATCH v3 08/15] monitor: implement 'qmp_query_commands' without qmp_cmds, marcandre . lureau, 2016/08/08
[Qemu-devel] [PATCH v3 09/15] qapi: remove the "middle" mode, marcandre . lureau, 2016/08/08
[Qemu-devel] [PATCH v3 10/15] qapi: check invalid arguments on no-args commands, marcandre . lureau, 2016/08/08
[Qemu-devel] [PATCH v3 11/15] qmp: update qmp_query_spice fallback, marcandre . lureau, 2016/08/08
- Re: [Qemu-devel] [PATCH v3 11/15] qmp: update qmp_query_spice fallback,
Markus Armbruster <=
[Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), marcandre . lureau, 2016/08/08
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Markus Armbruster, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Daniel P. Berrange, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Marc-André Lureau, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Markus Armbruster, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Marc-André Lureau, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Markus Armbruster, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Marc-André Lureau, 2016/08/09
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Markus Armbruster, 2016/08/10
- Re: [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), Marc-André Lureau, 2016/08/10