From: Allan Stephens Date: Tue, 17 Aug 2010 11:00:05 +0000 (+0000) Subject: tipc: Provide correct error code for unsupported connect() operation X-Git-Tag: v2.6.37-rc1~147^2~810 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35997e3157eba16c6124d440bdf9272087129b2a;p=profile%2Fivi%2Fkernel-x86-ivi.git tipc: Provide correct error code for unsupported connect() operation Modify TIPC to return EOPNOTSUPP if an application attempts to perform a non-blocking connect() operation, which is not supported by TIPC. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker Signed-off-by: David S. Miller --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 69d0fd1..b89c7b1 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1380,7 +1380,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, /* For now, TIPC does not support the non-blocking form of connect() */ if (flags & O_NONBLOCK) { - res = -EWOULDBLOCK; + res = -EOPNOTSUPP; goto exit; }