]> www.infradead.org Git - users/dwmw2/qemu.git/commit
nbd/client: Use error_prepend() correctly
authorEric Blake <eblake@redhat.com>
Mon, 13 Nov 2017 15:24:24 +0000 (09:24 -0600)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Dec 2017 15:50:49 +0000 (09:50 -0600)
commit56a10ff664cf1a9be5dc97695e1cb7f028d1ab38
tree84d91b360cbe2e8bd39d7c4e30cd2924743b6afb
parent69f562ad9efbe7db5f99c879e2ff96d4d8403e46
nbd/client: Use error_prepend() correctly

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

Originally botched in commit e44ed99d, then several more instances
added in the meantime.

Pre-existing and not fixed here: we are inconsistent on capitalization;
some of our messages start with lower case, and others start with upper,
although the use of error_prepend() is much nicer to read when all
fragments consistently start with lower.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171113152424.25381-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
(cherry picked from commit cb6b1a3fc30c52ffd94ed0b69ca5991b19651724)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
nbd/client.c