vfio: Pass an Error object to vfio_connect_container
commit01905f58f166646619c35a2ebfc3ca3ed4cad62d
authorEric Auger <eric.auger@redhat.com>
Mon, 17 Oct 2016 16:57:59 +0000 (17 10:57 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 17 Oct 2016 16:57:59 +0000 (17 10:57 -0600)
tree666c8260b7cbe995cee44a6cbe3222e3c9c525a0
parent7237011d0596e57f42d2a4e0556034b8d13533fe
vfio: Pass an Error object to vfio_connect_container

The error is currently simply reported in vfio_get_group. Don't
bother too much with the prefix which will be handled at upper level,
later on.

Also return an error value in case container->error is not 0 and
the container is teared down.

On vfio_spapr_remove_window failure, we also report an error whereas
it was silent before.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c