qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/31] char: Use error_printf() to print help an


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 06/31] char: Use error_printf() to print help and such
Date: Tue, 9 Oct 2018 08:09:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 08/10/2018 19:31, Markus Armbruster wrote:
> Calling error_report() in a function that takes an Error ** argument
> is suspicious.  Convert a few that are actually help and such to
> error_printf().
> 
> Improves output of -chardev help from
> 
>     qemu-system-x86_64: -chardev help: Available chardev backend types:
>     serial
>     ...
> 
> to
> 
>     Available chardev backend types:
>     serial
>     ...
> 
> Cc: Paolo Bonzini <address@hidden>
> Cc: "Marc-André Lureau" <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  chardev/char-pty.c | 2 +-
>  chardev/char.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/chardev/char-pty.c b/chardev/char-pty.c
> index e8d9a53476..f681d637c1 100644
> --- a/chardev/char-pty.c
> +++ b/chardev/char-pty.c
> @@ -259,7 +259,7 @@ static void char_pty_open(Chardev *chr,
>      qemu_set_nonblock(master_fd);
>  
>      chr->filename = g_strdup_printf("pty:%s", pty_name);
> -    error_report("char device redirected to %s (label %s)",
> +    error_printf("char device redirected to %s (label %s)\n",
>                   pty_name, chr->label);
>  
>      s = PTY_CHARDEV(chr);
> diff --git a/chardev/char.c b/chardev/char.c
> index e115166995..7f07a1bfbd 100644
> --- a/chardev/char.c
> +++ b/chardev/char.c
> @@ -634,7 +634,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error 
> **errp)
>  
>          chardev_name_foreach(help_string_append, str);
>  
> -        error_report("Available chardev backend types: %s", str->str);
> +        error_printf("Available chardev backend types: %s\n", str->str);
>          g_string_free(str, true);
>          return NULL;
>      }
> 



reply via email to

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