qemu-e2k/nbd
Vladimir Sementsov-Ogievskiy e6798f06a6 nbd: generalize usage of nbd_read
We generally do very similar things around nbd_read: error_prepend
specifying what we have tried to read, and be_to_cpu conversion of
integers.

So, it seems reasonable to move common things to helper functions,
which:
1. simplify code a bit
2. generalize nbd_read error descriptions, all starting with
   "Failed to read"
3. make it more difficult to forget to convert things from BE

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190128165830.165170-1-vsementsov@virtuozzo.com>
[eblake: rename macro to DEF_NBD_READ_N and formatting tweaks;
checkpatch has false positive complaint]
Signed-off-by: Eric Blake <eblake@redhat.com>
2019-02-04 15:11:27 -06:00
..
client.c nbd: generalize usage of nbd_read 2019-02-04 15:11:27 -06:00
common.c nbd: generalize usage of nbd_read 2019-02-04 15:11:27 -06:00
Makefile.objs
nbd-internal.h
server.c nbd: generalize usage of nbd_read 2019-02-04 15:11:27 -06:00
trace-events nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO 2019-01-21 15:49:52 -06:00