qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/4] monitor: Move monitor option parsing to monitor/monit


From: Markus Armbruster
Subject: Re: [PATCH v2 1/4] monitor: Move monitor option parsing to monitor/monitor.c
Date: Wed, 29 Jan 2020 07:06:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Kevin Wolf <address@hidden> 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 <address@hidden>
> Reviewed-by: Markus Armbruster <address@hidden>
> ---
>  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 <address@hidden>




reply via email to

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