[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-4.0 v7 26/27] qapi: add more conditions to S
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-4.0 v7 26/27] qapi: add more conditions to SPICE |
Date: |
Tue, 11 Dec 2018 18:11:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> Now that member can be made conditional, let's make SPICE chardev
> conditional:
>
> * spiceport, spicevmc
>
> Before and after the patch for !CONFIG_SPICE, the error is the
> same ('spiceport' is not a valid char driver name).
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> qapi/char.json | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/qapi/char.json b/qapi/char.json
> index 24628331ec..77ed847972 100644
> --- a/qapi/char.json
> +++ b/qapi/char.json
> @@ -332,8 +332,8 @@
> ##
> { 'struct': 'ChardevSpiceChannel',
> 'data': { 'type': 'str' },
> - 'base': 'ChardevCommon' }
> -# TODO: 'if': 'defined(CONFIG_SPICE)'
> + 'base': 'ChardevCommon',
> + 'if': 'defined(CONFIG_SPICE)' }
>
> ##
> # @ChardevSpicePort:
> @@ -346,8 +346,8 @@
> ##
> { 'struct': 'ChardevSpicePort',
> 'data': { 'fqdn': 'str' },
> - 'base': 'ChardevCommon' }
> -# TODO: 'if': 'defined(CONFIG_SPICE)'
> + 'base': 'ChardevCommon',
> + 'if': 'defined(CONFIG_SPICE)' }
>
> ##
> # @ChardevVC:
> @@ -404,10 +404,10 @@
> 'testdev': 'ChardevCommon',
> 'stdio': 'ChardevStdio',
> 'console': 'ChardevCommon',
> - 'spicevmc': 'ChardevSpiceChannel',
> -# TODO: { 'type': 'ChardevSpiceChannel', 'if': 'defined(CONFIG_SPICE)' },
> - 'spiceport': 'ChardevSpicePort',
> -# TODO: { 'type': 'ChardevSpicePort', 'if': 'defined(CONFIG_SPICE)' },
> + 'spicevmc': { 'type': 'ChardevSpiceChannel',
> + 'if': 'defined(CONFIG_SPICE)' },
> + 'spiceport': { 'type': 'ChardevSpicePort',
> + 'if': 'defined(CONFIG_SPICE)' },
> 'vc': 'ChardevVC',
> 'ringbuf': 'ChardevRingbuf',
> # next one is just for compatibility
Reviewed-by: Markus Armbruster <address@hidden>
Reviewing this patch's effect on generated files led me to a few things.
None of them need to be addressed to get this series accepted. I
actually recommend not to address them in this series, because that
could lead to further delays.
There's an opportunity for minor output beautification: back-to-back
#endif / #if like
#endif /* defined(CONFIG_SPICE) */
#if defined(CONFIG_SPICE)
in generated C could be omitted.
The generated documentation shows conditionals as
If: 'defined(CONFIG_SPICE)'
We should at least explain this notation in the introduction. Other
notation, too. Predates this series.
Should we *strip* documentation for disabled stuff instead?
Complication: disabled everywhere, or just for a target? We build the
documentation only once, and that's a feature. We can therefore only
strip documentation for stuff that's disabled target-independently.
That's a bit more involved.
- Re: [Qemu-devel] [PATCH for-4.0 v7 21/27] qapi: add #if conditions to generated code members, (continued)
- [Qemu-devel] [PATCH for-4.0 v7 22/27] qapi: add 'If:' condition to enum values documentation, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 23/27] qapi: add 'If:' condition to struct members documentation, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 24/27] qapi: add condition to variants documentation, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 25/27] qapi: break long lines at 'data' member, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 26/27] qapi: add more conditions to SPICE, Marc-André Lureau, 2018/12/08
- Re: [Qemu-devel] [PATCH for-4.0 v7 26/27] qapi: add more conditions to SPICE,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH for-4.0 v7 00/27] Hi,, Marc-André Lureau, 2018/12/08
- [Qemu-devel] [PATCH for-4.0 v7 27/27] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2018/12/08
- Re: [Qemu-devel] [PATCH for-4.0 v7 00/27] Hi,, Markus Armbruster, 2018/12/12