aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/bnep/sock.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
commit48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch)
treeda3aa535c98cc0957851354ceb0fbff7482d7a9d /net/bluetooth/bnep/sock.c
parent1a1689344add3333d28d1b5495d8043a3877d01c (diff)
parent4409d28140d9a6e6e3f4f1fdaf7234c4b965d954 (diff)
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'net/bluetooth/bnep/sock.c')
-rw-r--r--net/bluetooth/bnep/sock.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index 5563db1bf526..6d7311cee1b4 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -1,4 +1,4 @@
1/* 1/*
2 BNEP implementation for Linux Bluetooth stack (BlueZ). 2 BNEP implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2001-2002 Inventel Systemes 3 Copyright (C) 2001-2002 Inventel Systemes
4 Written 2001-2002 by 4 Written 2001-2002 by
@@ -14,19 +14,19 @@
14 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
16 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 16 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
17 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 17 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
18 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 21
22 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 22 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
23 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 23 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
24 SOFTWARE IS DISCLAIMED. 24 SOFTWARE IS DISCLAIMED.
25*/ 25*/
26 26
27/* 27/*
28 * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $ 28 * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $
29 */ 29 */
30 30
31#include <linux/module.h> 31#include <linux/module.h>
32 32
@@ -89,7 +89,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
89 89
90 if (copy_from_user(&ca, argp, sizeof(ca))) 90 if (copy_from_user(&ca, argp, sizeof(ca)))
91 return -EFAULT; 91 return -EFAULT;
92 92
93 nsock = sockfd_lookup(ca.sock, &err); 93 nsock = sockfd_lookup(ca.sock, &err);
94 if (!nsock) 94 if (!nsock)
95 return err; 95 return err;
@@ -101,20 +101,20 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
101 101
102 err = bnep_add_connection(&ca, nsock); 102 err = bnep_add_connection(&ca, nsock);
103 if (!err) { 103 if (!err) {
104 if (copy_to_user(argp, &ca, sizeof(ca))) 104 if (copy_to_user(argp, &ca, sizeof(ca)))
105 err = -EFAULT; 105 err = -EFAULT;
106 } else 106 } else
107 fput(nsock->file); 107 fput(nsock->file);
108 108
109 return err; 109 return err;
110 110
111 case BNEPCONNDEL: 111 case BNEPCONNDEL:
112 if (!capable(CAP_NET_ADMIN)) 112 if (!capable(CAP_NET_ADMIN))
113 return -EACCES; 113 return -EACCES;
114 114
115 if (copy_from_user(&cd, argp, sizeof(cd))) 115 if (copy_from_user(&cd, argp, sizeof(cd)))
116 return -EFAULT; 116 return -EFAULT;
117 117
118 return bnep_del_connection(&cd); 118 return bnep_del_connection(&cd);
119 119
120 case BNEPGETCONNLIST: 120 case BNEPGETCONNLIST:
@@ -123,7 +123,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
123 123
124 if (cl.cnum <= 0) 124 if (cl.cnum <= 0)
125 return -EINVAL; 125 return -EINVAL;
126 126
127 err = bnep_get_connlist(&cl); 127 err = bnep_get_connlist(&cl);
128 if (!err && copy_to_user(argp, &cl, sizeof(cl))) 128 if (!err && copy_to_user(argp, &cl, sizeof(cl)))
129 return -EFAULT; 129 return -EFAULT;
@@ -163,7 +163,7 @@ static int bnep_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigne
163 163
164 if (cl.cnum <= 0) 164 if (cl.cnum <= 0)
165 return -EINVAL; 165 return -EINVAL;
166 166
167 err = bnep_get_connlist(&cl); 167 err = bnep_get_connlist(&cl);
168 168
169 if (!err && put_user(cl.cnum, (uint32_t __user *) arg)) 169 if (!err && put_user(cl.cnum, (uint32_t __user *) arg))