diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-01-25 17:18:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 17:18:43 +0000 |
commit | cf57284b6666e4d8e91542a2de11ef6f4c28d54e (patch) | |
tree | 149242446a3ee286b20e3c599b28f0f77b3ef156 | |
parent | 405bd61b0e9cd06bf553ebcc7f21f8e581c84cfa (diff) | |
download | libvfio-user-cf57284b6666e4d8e91542a2de11ef6f4c28d54e.zip libvfio-user-cf57284b6666e4d8e91542a2de11ef6f4c28d54e.tar.gz libvfio-user-cf57284b6666e4d8e91542a2de11ef6f4c28d54e.tar.bz2 |
print errno string instead of errno value (#251)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r-- | lib/libvfio-user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c index d98994e..6aba044 100644 --- a/lib/libvfio-user.c +++ b/lib/libvfio-user.c @@ -321,9 +321,9 @@ handle_region_access(vfu_ctx_t *vfu_ctx, uint32_t size, uint16_t cmd, cmd == VFIO_USER_REGION_WRITE); if (ret != ra->count) { - vfu_log(vfu_ctx, LOG_ERR, "failed to %s %#x-%#lx: %d", + vfu_log(vfu_ctx, LOG_ERR, "failed to %s %#x-%#lx: %s", cmd == VFIO_USER_REGION_WRITE ? "write" : "read", - ra->count, ra->offset + ra->count - 1, ret); + ra->count, ra->offset + ra->count - 1, strerror(-ret)); /* FIXME we should return whatever has been accessed, not an error */ if (ret >= 0) { ret = -EINVAL; |