On 10/12/2015 02:03 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  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