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 <marcandre.lur...@redhat.com> > --- > 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