qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.11] nbd/client: Use error_pre


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH for-2.11] nbd/client: Use error_prepend() correctly
Date: Mon, 13 Nov 2017 12:19:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 11/13/2017 11:14 AM, Markus Armbruster wrote:
> Eric Blake <address@hidden> writes:
> 
>> When using error prepend(), it is necessary to end with a space
>> in the format string; otherwise, messages come out incorrectly,
>> such as when connecting to a socket that hangs up immediately:
>>
>> can't open device nbd://localhost:10809/: Failed to read dataUnexpected 
>> end-of-file before all bytes were read
>>

> Preexisting: inconsistent capitalization (Failed vs. failed).
> 
> In general, prepend chains looks slightly less ugly when each link
> starts with a lower case letter.  Compare:
> 
>     can't open device nbd://localhost:10809/: failed to read data: unexpected 
> end-of-file before all bytes were read
>     Can't open device nbd://localhost:10809/: Failed to read data: Unexpected 
> end-of-file before all bytes were read
> 
> Neither message is really good, but the second one is ugly to boot.

A tree-wide search shows that we have no strong preference for
capitalization or not; but I can do a followup patch for at least NBD
code to prefer lower-case, and enforce that style in future NBD-related
patches.  Not sure if that followup would be 2.11 material, though.

> 
> Reviewed-by: Markus Armbruster <address@hidden>
> 

Thanks

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]