[sheepdog] [PATCH] sheepdog: Set error when connection fails
Jeff Cody
jcody at redhat.com
Thu Apr 20 17:21:59 CEST 2017
On Thu, Apr 20, 2017 at 12:00:03PM +0800, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz at redhat.com>
> ---
> block/sheepdog.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/block/sheepdog.c b/block/sheepdog.c
> index fb9203e..7e889ee 100644
> --- a/block/sheepdog.c
> +++ b/block/sheepdog.c
> @@ -608,6 +608,7 @@ static int connect_to_sdog(BDRVSheepdogState *s, Error **errp)
> qemu_set_nonblock(fd);
> } else {
> fd = -EIO;
> + error_setg(errp, "Failed to connect to sheepdog server");
> }
A bit odd that we don't just return right away in this function after a
failed called to socket_connect(), but that has nothing to do with your
patch.
Reviewed-by: Jeff Cody <jcody at redhat.com>
>
> return fd;
> --
> 2.9.3
>
More information about the sheepdog
mailing list