[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/12] qdev-monitor: print help to stdout
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/12] qdev-monitor: print help to stdout |
Date: |
Fri, 7 Sep 2018 10:22:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-09-07 09:59, Marc-André Lureau wrote:
> qdev_device_help() is used from command line "-device help", or from
> HMP "device_add". If used from command line, print help to stdout
> (it is only printed on explicit demand).
Good idea, it always bugged me that "-device help" behaves differently
than "-help"!
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> include/monitor/monitor.h | 2 ++
> monitor.c | 16 +++++++++++++---
> qdev-monitor.c | 32 +++++++++++++++++++-------------
> 3 files changed, 34 insertions(+), 16 deletions(-)
>
> diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
> index 2ef5e04b37..e7667fda35 100644
> --- a/include/monitor/monitor.h
> +++ b/include/monitor/monitor.h
> @@ -47,4 +47,6 @@ int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd);
> void monitor_fdset_dup_fd_remove(int dup_fd);
> int monitor_fdset_dup_fd_find(int dup_fd);
>
> +void out_vprintf(FILE *stream, const char *fmt, va_list ap) GCC_FMT_ATTR(2,
> 0);
The name is a little bit too generic for my taste ... but I also fail to
come up with really good suggestions... maybe "mon_file_vprintf()" or
something similar?
Thomas