On 04/10/2014 02:24 AM, Laszlo Ersek wrote: > The return type is also changed from "int" to "void", because it was used > in a success vs. failure sense only (the caller didn't distinguish error > codes from each other, and even assigned_dev_register_msix_mmio() masked > mmap()'s errno values with a common -EFAULT). > > Signed-off-by: Laszlo Ersek <[email protected]> > --- > hw/i386/kvm/pci-assign.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) >
> dev->msix_table = mmap(NULL, MSIX_PAGE_SIZE, PROT_READ|PROT_WRITE,
> MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
> if (dev->msix_table == MAP_FAILED) {
> - error_report("fail allocate msix_table! %s", strerror(errno));
> - return -EFAULT;
> + error_setg_errno(errp, errno, "failed to allocate msix_table");
Nice cleanup of the grammar while in the process.
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
