[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 10/14] nbd/client: Split handshake into two func
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-block] [PATCH 10/14] nbd/client: Split handshake into two functions |
Date: |
Thu, 6 Dec 2018 17:06:46 +0000 |
06.12.2018 18:16, Vladimir Sementsov-Ogievskiy wrote:
> 01.12.2018 1:03, Eric Blake wrote:
>> + * Returns: negative errno: failure talking to server
>> + * 0: server is oldstyle, client must still parse export size
>> + * 1: server is newstyle, but can only accept EXPORT_NAME
>> + * 2: server is newstyle, but lacks structured replies
>> + * 3: server is newstyle and set up for structured replies
>> + */
>
> hmm, may be, introduce enum of named constants, instead of raw numbers?
>
> NBD_STARTED_OLD_STYLE
> NBD_STARTED_NEW_STYLE
> NBD_STARTED_NEW_STYLE_FIXED
> NBD_STARTED_STRUCTURED_REPLIES
>
> or, at least, add short comment after each return statement, to not scroll up
> every time (like you gracefully do after each case: statement).
>
> However, I'm okay with either way.
>
I mean, including "as is".
--
Best regards,
Vladimir