From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
vsementsov@virtuozzo.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.11] nbd/client: Use error_prepend() correctly
Date: Tue, 14 Nov 2017 08:28:37 +0100 [thread overview]
Message-ID: <87a7zpwc7u.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <e9e7bf10-bc24-0524-bb02-5328718d124a@redhat.com> (Eric Blake's message of "Mon, 13 Nov 2017 12:19:59 -0600")
Eric Blake <eblake@redhat.com> writes:
> On 11/13/2017 11:14 AM, Markus Armbruster wrote:
>> Eric Blake <eblake@redhat.com> 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.
Tree-wide consistency would take consensus on the new rule, a tree-wide
patch (always a bother) to fix up the code, and a checkpatch patch to
catch regressions. We got bigger fish to fry.
Local consistency is much easier. Maintainer's discretion (here:
yours).
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>>
>
> Thanks
next prev parent reply other threads:[~2017-11-14 7:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 15:24 [Qemu-devel] [PATCH for-2.11] nbd/client: Use error_prepend() correctly Eric Blake
2017-11-13 15:32 ` Eric Blake
2017-11-13 16:23 ` Vladimir Sementsov-Ogievskiy
2017-11-13 17:10 ` Markus Armbruster
2017-11-13 16:27 ` Vladimir Sementsov-Ogievskiy
2017-11-13 17:14 ` Markus Armbruster
2017-11-13 18:19 ` Eric Blake
2017-11-14 7:28 ` Markus Armbruster [this message]
2017-11-13 18:21 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7zpwc7u.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).