[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140208231743.GB12704@kria>
Date: Sun, 9 Feb 2014 00:17:43 +0100
From: Sabrina Dubroca <sd@...asysnail.net>
To: acme@...stprotocols.net
Cc: davem@...emloft.net, netdev@...r.kernel.org, 00cpxxx@...il.com
Subject: Re: [PATCH] ipx: implement shutdown()
2014-02-09, 00:04:29 +0100, Sabrina Dubroca wrote:
> +static int ipx_shutdown(struct socket *sock, int mode)
> +{
> + struct sock *sk = sock->sk;
> +
> + printk(KERN_INFO "IPX: shutting down %d\n", mode);
> + if (mode < SHUT_RD || mode > SHUT_RDWR)
> + return -EINVAL;
> + /* This maps:
> + * SHUT_RD (0) -> RCV_SHUTDOWN (1)
> + * SHUT_WR (1) -> SEND_SHUTDOWN (2)
> + * SHUT_RDWR (2) -> SHUTDOWN_MASK (3)
> + */
> + ++mode;
> +
> + lock_sock(sk);
> + sk->sk_shutdown |= mode;
> + release_sock(sk);
> + sk->sk_state_change(sk);
> + printk(KERN_INFO "IPX: socket shut down\n");
> +
> + return 0;
> +}
Sorry, I sent the version with the debugging in. I'll resend a clean one.
--
Sabrina
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists