Re: [Qemu-block] [RFC] nbd: generalize usage of nbd_read

2019-01-17 Thread Eric Blake
On 1/16/19 8:23 AM, Vladimir Sementsov-Ogievskiy wrote: > 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.

[Qemu-block] [RFC] nbd: generalize usage of nbd_read

2019-01-16 Thread Vladimir Sementsov-Ogievskiy
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