[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/6] s390x/vfio-ap: report correct error
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 1/6] s390x/vfio-ap: report correct error |
Date: |
Mon, 5 Nov 2018 17:43:35 +0100 |
If ioctl(..., VFIO_DEVICE_RESET) fails, we want to report errno
instead of ret (which is always -1 on error).
Fixes Coverity issue CID 1396176.
Reported-by: Peter Maydell <address@hidden>
Reviewed-by: Christian Borntraeger <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Tony Krowiak <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/vfio/ap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 3962bb74e5..65de952f44 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -142,7 +142,7 @@ static void vfio_ap_reset(DeviceState *dev)
ret = ioctl(vapdev->vdev.fd, VFIO_DEVICE_RESET);
if (ret) {
error_report("%s: failed to reset %s device: %s", __func__,
- vapdev->vdev.name, strerror(ret));
+ vapdev->vdev.name, strerror(errno));
}
}
--
2.14.5
- [Qemu-devel] [PULL 0/6] final s390x patches for -rc0, Cornelia Huck, 2018/11/05
- [Qemu-devel] [PULL 2/6] MAINTAINERS: s390: more maintainers for vfio-ccw, Cornelia Huck, 2018/11/05
- [Qemu-devel] [PULL 5/6] MAINTAINERS: s390: Remove myself, Cornelia Huck, 2018/11/05
- [Qemu-devel] [PULL 1/6] s390x/vfio-ap: report correct error,
Cornelia Huck <=
- [Qemu-devel] [PULL 4/6] MAINTAINERS: s390/pci: add Collin Walling as maintainer for zpci, Cornelia Huck, 2018/11/05
- [Qemu-devel] [PULL 6/6] MAINTAINERS: s390/boot: the ipl code and the bios belong together, Cornelia Huck, 2018/11/05
- [Qemu-devel] [PULL 3/6] MAINTAINERS: s390/virtio-ccw: drop Christian, add Halil, Cornelia Huck, 2018/11/05
- Re: [Qemu-devel] [PULL 0/6] final s390x patches for -rc0, Peter Maydell, 2018/11/06