diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2017-05-26 14:09:13 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-06-06 20:18:36 +0200 |
commit | be41c100c0d67f6072ddd4910c4b6f7d239f025f (patch) | |
tree | 5aebff2d21919aa483a65ab5c88d4dabb6950a66 /block | |
parent | e44ed99d1949315755bffb12a5a483ac66d4a976 (diff) | |
download | qemu-be41c100c0d67f6072ddd4910c4b6f7d239f025f.zip qemu-be41c100c0d67f6072ddd4910c4b6f7d239f025f.tar.gz qemu-be41c100c0d67f6072ddd4910c4b6f7d239f025f.tar.bz2 |
nbd/client.c: use errp instead of LOG
Move to modern errp scheme from just LOGging errors.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170526110913.89098-1-vsementsov@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/nbd-client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c index 538d95e..09d955b 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -28,6 +28,7 @@ */ #include "qemu/osdep.h" +#include "qapi/error.h" #include "nbd-client.h" #define HANDLE_TO_INDEX(bs, handle) ((handle) ^ ((uint64_t)(intptr_t)bs)) @@ -70,10 +71,14 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque) NBDClientSession *s = opaque; uint64_t i; int ret; + Error *local_err = NULL; for (;;) { assert(s->reply.handle == 0); - ret = nbd_receive_reply(s->ioc, &s->reply); + ret = nbd_receive_reply(s->ioc, &s->reply, &local_err); + if (ret < 0) { + error_report_err(local_err); + } if (ret <= 0) { break; } |