]> Git Repo - qemu.git/commit - nbd/client.c
nbd/client: Use error_prepend() correctly
authorEric Blake <[email protected]>
Mon, 13 Nov 2017 15:24:24 +0000 (09:24 -0600)
committerEric Blake <[email protected]>
Fri, 17 Nov 2017 14:02:45 +0000 (08:02 -0600)
commitcb6b1a3fc30c52ffd94ed0b69ca5991b19651724
tree8c38d9416a14bb411219670a00520622a44992ba
parent08ace1d75372b57c5ab56aea02c71cdda4b58fdf
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: [email protected]
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <20171113152424[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
nbd/client.c
This page took 0.024343 seconds and 4 git commands to generate.