Hi On Fri, Sep 7, 2018 at 5:49 PM Eric Blake <ebl...@redhat.com> wrote: > > On 09/07/2018 02:59 AM, 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). > > > > 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); > > Perhaps name this monitor_vfprintf()? (That would match the fact that > you are using it like normal vfprintf). > > > +++ b/qdev-monitor.c > > @@ -104,22 +104,31 @@ static bool qdev_class_has_alias(DeviceClass *dc) > > return (qdev_class_get_alias(dc) != NULL); > > } > > > > +static void out_printf(const char *fmt, ...) > > +{ > > + va_list ap; > > + > > + va_start(ap, fmt); > > + out_vprintf(stdout, fmt, ap); > > + va_end(ap); > > +} > > But this name seems reasonable. > > And I just now see that Thomas also complained about the monitor.h > naming, but I like 'monitor_vfprintf' better than his 'mon_file_vprintf'. > > If an improved name is your only change, > Reviewed-by: Eric Blake <ebl...@redhat.com>
I'll change it to monitor_vfprintf, thanks > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3266 > Virtualization: qemu.org | libvirt.org > -- Marc-André Lureau