diff options
author | Eric Blake <eblake@redhat.com> | 2017-10-27 12:40:26 +0200 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2017-10-30 21:07:21 +0100 |
commit | e7a78d0eff820b56d33be31af1bb49e2948374fd (patch) | |
tree | 89887ad46bd17d537a529b25d448271124ac174b /nbd/server.c | |
parent | abf6e752e55b2f5afb48303429dea2db7c3a62de (diff) | |
download | qemu-e7a78d0eff820b56d33be31af1bb49e2948374fd.zip qemu-e7a78d0eff820b56d33be31af1bb49e2948374fd.tar.gz qemu-e7a78d0eff820b56d33be31af1bb49e2948374fd.tar.bz2 |
nbd: Include error names in trace messages
NBD errors were originally sent over the wire based on Linux errno
values; but not all the world is Linux, and not all platforms share
the same values. Since a number isn't very easy to decipher on all
platforms, update the trace messages to include the name of NBD
errors being sent/received over the wire. Tweak the trace messages
to be at the point where we are using the NBD error, not the
translation to the host errno values.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20171027104037.8319-2-eblake@redhat.com>
Diffstat (limited to 'nbd/server.c')
-rw-r--r-- | nbd/server.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nbd/server.c b/nbd/server.c index 3df3548..459e00c 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1227,7 +1227,8 @@ static int nbd_co_send_simple_reply(NBDClient *client, {.iov_base = data, .iov_len = len} }; - trace_nbd_co_send_simple_reply(handle, nbd_err, len); + trace_nbd_co_send_simple_reply(handle, nbd_err, nbd_err_lookup(nbd_err), + len); set_be_simple_reply(&reply, nbd_err, handle); return nbd_co_send_iov(client, iov, len ? 2 : 1, errp); |