qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/16] pci-assign: propagate errors from get_rea


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 10/16] pci-assign: propagate errors from get_real_device()
Date: Tue, 29 Apr 2014 13:15:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/10/2014 02:24 AM, Laszlo Ersek wrote:
> Signed-off-by: Laszlo Ersek <address@hidden>
> ---
>  hw/i386/kvm/pci-assign.c | 40 ++++++++++++++++++++--------------------
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 

>  again:
>      r = read(dev->config_fd, pci_dev->dev.config,
>               pci_config_size(&pci_dev->dev));
>      if (r < 0) {
>          if (errno == EINTR || errno == EAGAIN) {
>              goto again;
>          }
> -        error_report("%s: read failed, errno = %d", __func__, errno);
> -        return 1;
> +        error_setg_errno(errp, errno, "read(\"%s\")",
> +                         (pci_dev->configfd_name && *pci_dev->configfd_name) 
> ?
> +                         pci_dev->configfd_name : name);
> +        return;

Nice, this gets rid of the unusual 'return positive on failure'
semantics (I had to check in 9/16 that your added 'return 1' was
contextually correct; and here you take it right back out again).

Reviewed-by: Eric Blake <address@hidden>

-- 
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]