[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [PATCHv2] Document format of strings in one place, limit to 4096 bytes



On 04/06/2016 04:22 PM, Alex Bligh wrote:
> * Document the format of strings centrally using correct terminology
> 
> * Remove duplications of dealing with 'NUL characters'.
> 
> Signed-off-by: Alex Bligh <alex@...872...>
> ---
>  doc/proto.md | 46 +++++++++++++++++++++++-----------------------
>  1 file changed, 23 insertions(+), 23 deletions(-)

> +++ b/doc/proto.md
> @@ -25,6 +25,12 @@ comments) constant names, `0xdeadbeef` is used for literal hex numbers
>  (which are always sent in network byte order), and (brackets) are used
>  for comments. Anything else is a description of the data that is sent.
>  
> +Where this document refers to a string, then unless otherwise stated,
> +that string is a sequence of UTF-8 code points, which is not `NUL`
> +terminated, MUST NOT contain `NUL` characters, SHOULD no longer than

s/SHOULD no/SHOULD be no/

> +256 bytes and MUST be no longer than 4096 bytes or less. This applies

s/or less//

> +to export names and error messages (amongst others).

Maybe an additional sentence along the lines of:

The length of a string is always available through information sent
earlier in the same message, although it may require some computation
based on the size of other data also present in the same message.

[yes, I meant 'may' not 'MAY' there]

Otherwise looks good to me.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: