qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 14/21] qemu-char: convert braille backend to dat


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 14/21] qemu-char: convert braille backend to data-driven creation
Date: Mon, 12 Oct 2015 09:30:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/12/2015 02:03 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  backends/baum.c       | 13 ++++++++-----
>  include/sysemu/char.h |  3 ---
>  qemu-char.c           |  4 +---
>  stubs/Makefile.objs   |  1 -
>  stubs/chr-baum-init.c |  7 -------
>  5 files changed, 9 insertions(+), 19 deletions(-)
>  delete mode 100644 stubs/chr-baum-init.c
> 

> @@ -586,14 +589,14 @@ CharDriverState *chr_baum_init(void)
>  
>      baum->brlapi_fd = brlapi__openConnection(handle, NULL, NULL);
>      if (baum->brlapi_fd == -1) {
> -        brlapi_perror("baum_init: brlapi_openConnection");
> +        error_setg(errp, "baum_init: brlapi_openConnection");

error_setg() already tracks function name, so you could drop 'baum_init:
'.  Also, I assume that brlapi_perror() adds additional information to
the error message it prints, such as conversion of a brlapi-specific
error message in the same manner in which perror() converts errno and in
which error_setg_errno() would be used.  So I don't know if this
conversion is the best.  But I'm unfamiliar with brlapi_* in general, to
know if there is anything better to use, so I'd rather get a second
opinion on this.
'
Other than the possibility of the incorrect conversion of (several)
error messages, the rest of the patch looks fine to me.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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