Re: [Qemu-devel] [PATCH v5 05/11] nbd/server: Refactor zero-length option check

2017-10-20 Thread Vladimir Sementsov-Ogievskiy
20.10.2017 18:07, Eric Blake wrote: On 10/20/2017 03:34 AM, Vladimir Sementsov-Ogievskiy wrote: 20.10.2017 01:26, Eric Blake wrote: Consolidate the check for a zero-length payload to an option into a new function, nbd_check_zero_length(); this check will also be used when introducing support fo

Re: [Qemu-devel] [PATCH v5 05/11] nbd/server: Refactor zero-length option check

2017-10-20 Thread Eric Blake
On 10/20/2017 03:34 AM, Vladimir Sementsov-Ogievskiy wrote: > 20.10.2017 01:26, Eric Blake wrote: >> Consolidate the check for a zero-length payload to an option >> into a new function, nbd_check_zero_length(); this check will >> also be used when introducing support for structured replies. >> >> B

Re: [Qemu-devel] [PATCH v5 05/11] nbd/server: Refactor zero-length option check

2017-10-20 Thread Vladimir Sementsov-Ogievskiy
20.10.2017 01:26, Eric Blake wrote: Consolidate the check for a zero-length payload to an option into a new function, nbd_check_zero_length(); this check will also be used when introducing support for structured replies. By sticking a catch-all check at the end of the loop for processing options

[Qemu-devel] [PATCH v5 05/11] nbd/server: Refactor zero-length option check

2017-10-19 Thread Eric Blake
Consolidate the check for a zero-length payload to an option into a new function, nbd_check_zero_length(); this check will also be used when introducing support for structured replies. By sticking a catch-all check at the end of the loop for processing options, we can simplify several of the inter