On 2/14/20 10:47 AM, Cornelia Huck wrote:
On Fri, 14 Feb 2020 09:47:39 +0100
Michal Privoznik <mpriv...@redhat.com> wrote:
In a few places we report errno formatted as a negative integer.
This is not as user friendly as it can be. Use strerror() and/or
error_setg_errno() instead.
Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
hw/vfio/common.c | 2 +-
util/vfio-helpers.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 5ca11488d6..a3a2a82d99 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -352,7 +352,7 @@ static int vfio_dma_map(VFIOContainer *container, hwaddr
iova,
return 0;
}
- error_report("VFIO_MAP_DMA: %d", -errno);
+ error_report("VFIO_MAP_DMA failed: %s", strerror(errno));
return -errno;
}
I think you missed the one in vfio_dma_unmap().
Indeed, will send v2.
Michal