All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH v2 1/4] monitor: Move monitor option parsing to monitor/monitor.c
Date: Wed, 29 Jan 2020 07:06:39 +0100	[thread overview]
Message-ID: <87wo9a4x00.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20200128175211.30007-2-kwolf@redhat.com> (Kevin Wolf's message of "Tue, 28 Jan 2020 18:52:08 +0100")

Kevin Wolf <kwolf@redhat.com> writes:

> Both the system emulators and tools with QMP support (specifically, the
> planned storage daemon) will need to parse monitor options, so move that
> code to monitor/monitor.c, which can be linked into binaries that aren't
> a system emulator.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/monitor/monitor.h |  4 ++++
>  include/sysemu/sysemu.h   |  1 -
>  monitor/monitor.c         | 48 +++++++++++++++++++++++++++++++++++++++
>  vl.c                      | 45 +-----------------------------------
>  4 files changed, 53 insertions(+), 45 deletions(-)
>
> diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
> index a81eeff5f8..ecf6cce827 100644
> --- a/include/monitor/monitor.h
> +++ b/include/monitor/monitor.h
> @@ -3,6 +3,7 @@
>  
>  #include "block/block.h"
>  #include "qapi/qapi-types-misc.h"
> +#include "qemu/option.h"

Superfluous; qemu/typedefs.h already provides what you need.

>  #include "qemu/readline.h"
>  
>  extern __thread Monitor *cur_mon;
> @@ -10,12 +11,15 @@ typedef struct MonitorHMP MonitorHMP;
>  
>  #define QMP_REQ_QUEUE_LEN_MAX 8
>  
> +extern QemuOptsList qemu_mon_opts;
> +
>  bool monitor_cur_is_qmp(void);
>  
>  void monitor_init_globals(void);
>  void monitor_init_globals_core(void);
>  void monitor_init_qmp(Chardev *chr, bool pretty);
>  void monitor_init_hmp(Chardev *chr, bool use_readline);
> +int monitor_init_opts(QemuOpts *opts, Error **errp);
>  void monitor_cleanup(void);
>  
>  int monitor_suspend(Monitor *mon);
[...]

With the superfluous #include dropped:
Reviewed-by: Markus Armbruster <armbru@redhat.com>



  reply	other threads:[~2020-01-29  6:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 17:52 [PATCH v2 0/4] monitor: Refactoring in preparation for qemu-storage-daemon Kevin Wolf
2020-01-28 17:52 ` [PATCH v2 1/4] monitor: Move monitor option parsing to monitor/monitor.c Kevin Wolf
2020-01-29  6:06   ` Markus Armbruster [this message]
2020-01-28 17:52 ` [PATCH v2 2/4] qapi: Create module 'control' Kevin Wolf
2020-01-29  8:35   ` Markus Armbruster
2020-01-29  9:09     ` Kevin Wolf
2020-01-29  9:41       ` Markus Armbruster
2020-01-29 10:17         ` Kevin Wolf
2020-01-28 17:52 ` [PATCH v2 3/4] monitor: Create monitor/qmp-cmds-control.c Kevin Wolf
2020-01-29  9:09   ` Markus Armbruster
2020-01-28 17:52 ` [PATCH v2 4/4] monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c Kevin Wolf
2020-01-29  9:11   ` Markus Armbruster

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=87wo9a4x00.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.