qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 22/26] qapi: make rtc-reset-reinjection depend o


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 22/26] qapi: make rtc-reset-reinjection depend on TARGET_I386
Date: Thu, 17 Aug 2017 13:57:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  qapi-schema.json |  3 ++-
>  monitor.c        | 10 ----------
>  2 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 2f4528c769..2361c13fc8 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -6270,7 +6270,8 @@
>  # <- { "return": {} }
>  #
>  ##
> -{ 'command': 'rtc-reset-reinjection' }
> +{ 'command': 'rtc-reset-reinjection',
> +  'if': ['defined(NEED_CPU_H)', 'defined(TARGET_I386)'] }

Aha, here' you use the list syntax.

And your strategy to keep things compiling also becomes clear: you wrap
uses of poisoned symbols like TARGET_I386 in #if defined(NEED_CPU_H).

Not exactly elegant, but looks workable.  But you need to explain this
solution in commit messages [PATCH 21, I guess] and document it in
qapi-code-gen.txt.  *Unless* we can find a better one.

>  
>  # Rocker ethernet network switch
>  { 'include': 'qapi/rocker.json' }
> diff --git a/monitor.c b/monitor.c
> index 383c84d162..f3dafafa22 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -970,9 +970,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject 
> **ret_data,
>   */
>  static void qmp_unregister_commands_hack(void)
>  {
> -#ifndef TARGET_I386
> -    qmp_unregister_command(&qmp_commands, "rtc-reset-reinjection");
> -#endif
>  #ifndef TARGET_S390X
>      qmp_unregister_command(&qmp_commands, "dump-skeys");
>  #endif
> @@ -4151,13 +4148,6 @@ QemuOptsList qemu_mon_opts = {
>      },
>  };
>  
> -#ifndef TARGET_I386
> -void qmp_rtc_reset_reinjection(Error **errp)
> -{
> -    error_setg(errp, QERR_FEATURE_DISABLED, "rtc-reset-reinjection");
> -}
> -#endif
> -
>  #ifndef TARGET_S390X
>  void qmp_dump_skeys(const char *filename, Error **errp)
>  {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]