On 04/10/2014 02:24 AM, Laszlo Ersek wrote: > Signed-off-by: Laszlo Ersek <[email protected]> > --- > 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 <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
