From: Ronnie Sahlberg Date: Mon, 2 Jan 2012 20:18:56 +0000 (+1100) Subject: Improve an error message to show the errno value X-Git-Tag: upstream/1.9.6^2~276 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=59f298f5bfdbd888b9fbce129a945d5e15953afa;p=deb_libnfs.git Improve an error message to show the errno value --- diff --git a/lib/socket.c b/lib/socket.c index 0f12697..23c3f10 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -411,7 +411,7 @@ static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_s if (connect(rpc->fd, (struct sockaddr *)s, socksize) != 0 && errno != EINPROGRESS) #endif { - rpc_set_error(rpc, "connect() to server failed"); + rpc_set_error(rpc, "connect() to server failed. %s(%d)", strerror(errno), errno); return -1; }