Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d64a850d
Commit
d64a850d
authored
Mar 07, 2003
by
James Morris
Committed by
David S. Miller
Mar 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Nuke SO_BSDCOMPAT.
parent
89865dbb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
52 deletions
+12
-52
arch/sparc/kernel/sys_sunos.c
arch/sparc/kernel/sys_sunos.c
+1
-23
arch/sparc/kernel/systbls.S
arch/sparc/kernel/systbls.S
+1
-1
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/sys_sunos32.c
+1
-24
arch/sparc64/kernel/systbls.S
arch/sparc64/kernel/systbls.S
+1
-1
include/net/sock.h
include/net/sock.h
+0
-1
net/core/sock.c
net/core/sock.c
+8
-2
No files found.
arch/sparc/kernel/sys_sunos.c
View file @
d64a850d
...
@@ -1107,38 +1107,16 @@ asmlinkage int sunos_send(int fd, void * buff, int len, unsigned flags)
...
@@ -1107,38 +1107,16 @@ asmlinkage int sunos_send(int fd, void * buff, int len, unsigned flags)
return
ret
;
return
ret
;
}
}
extern
asmlinkage
int
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
);
asmlinkage
int
sunos_socket
(
int
family
,
int
type
,
int
protocol
)
{
int
ret
,
one
=
1
;
ret
=
sys_socket
(
family
,
type
,
protocol
);
if
(
ret
<
0
)
goto
out
;
sys_setsockopt
(
ret
,
SOL_SOCKET
,
SO_BSDCOMPAT
,
(
char
*
)
&
one
,
sizeof
(
one
));
out:
return
ret
;
}
asmlinkage
int
sunos_accept
(
int
fd
,
struct
sockaddr
*
sa
,
int
*
addrlen
)
asmlinkage
int
sunos_accept
(
int
fd
,
struct
sockaddr
*
sa
,
int
*
addrlen
)
{
{
int
ret
,
one
=
1
;
int
ret
;
while
(
1
)
{
while
(
1
)
{
ret
=
check_nonblock
(
sys_accept
(
fd
,
sa
,
addrlen
),
fd
);
ret
=
check_nonblock
(
sys_accept
(
fd
,
sa
,
addrlen
),
fd
);
if
(
ret
!=
-
ENETUNREACH
&&
ret
!=
-
EHOSTUNREACH
)
if
(
ret
!=
-
ENETUNREACH
&&
ret
!=
-
EHOSTUNREACH
)
break
;
break
;
}
}
if
(
ret
<
0
)
goto
out
;
sys_setsockopt
(
ret
,
SOL_SOCKET
,
SO_BSDCOMPAT
,
(
char
*
)
&
one
,
sizeof
(
one
));
out:
return
ret
;
return
ret
;
}
}
...
...
arch/sparc/kernel/systbls.S
View file @
d64a850d
...
@@ -110,7 +110,7 @@ sunos_sys_table:
...
@@ -110,7 +110,7 @@ sunos_sys_table:
.
long
sys_getitimer
,
sys_gethostname
,
sys_sethostname
.
long
sys_getitimer
,
sys_gethostname
,
sys_sethostname
.
long
sunos_getdtablesize
,
sys_dup2
,
sunos_nop
.
long
sunos_getdtablesize
,
sys_dup2
,
sunos_nop
.
long
sys_fcntl
,
sunos_select
,
sunos_nop
.
long
sys_fcntl
,
sunos_select
,
sunos_nop
.
long
sys_fsync
,
sys_setpriority
,
s
uno
s_socket
.
long
sys_fsync
,
sys_setpriority
,
s
y
s_socket
.
long
sys_connect
,
sunos_accept
.
long
sys_connect
,
sunos_accept
/*
100
*/
.
long
sys_getpriority
,
sunos_send
,
sunos_recv
/*
100
*/
.
long
sys_getpriority
,
sunos_send
,
sunos_recv
.
long
sunos_nosys
,
sys_bind
,
sunos_setsockopt
.
long
sunos_nosys
,
sys_bind
,
sunos_setsockopt
...
...
arch/sparc64/kernel/sys_sunos32.c
View file @
d64a850d
...
@@ -1254,26 +1254,9 @@ asmlinkage int sunos_send(int fd, u32 buff, int len, unsigned flags)
...
@@ -1254,26 +1254,9 @@ asmlinkage int sunos_send(int fd, u32 buff, int len, unsigned flags)
return
ret
;
return
ret
;
}
}
extern
asmlinkage
int
sys_setsockopt
(
int
fd
,
int
level
,
int
optname
,
char
*
optval
,
int
optlen
);
asmlinkage
int
sunos_socket
(
int
family
,
int
type
,
int
protocol
)
{
int
ret
,
one
=
1
;
ret
=
sys_socket
(
family
,
type
,
protocol
);
if
(
ret
<
0
)
goto
out
;
sys_setsockopt
(
ret
,
SOL_SOCKET
,
SO_BSDCOMPAT
,
(
char
*
)
&
one
,
sizeof
(
one
));
out:
return
ret
;
}
asmlinkage
int
sunos_accept
(
int
fd
,
u32
sa
,
u32
addrlen
)
asmlinkage
int
sunos_accept
(
int
fd
,
u32
sa
,
u32
addrlen
)
{
{
int
ret
,
one
=
1
;
int
ret
;
while
(
1
)
{
while
(
1
)
{
ret
=
check_nonblock
(
sys_accept
(
fd
,
(
struct
sockaddr
*
)
A
(
sa
),
ret
=
check_nonblock
(
sys_accept
(
fd
,
(
struct
sockaddr
*
)
A
(
sa
),
...
@@ -1281,12 +1264,6 @@ asmlinkage int sunos_accept(int fd, u32 sa, u32 addrlen)
...
@@ -1281,12 +1264,6 @@ asmlinkage int sunos_accept(int fd, u32 sa, u32 addrlen)
if
(
ret
!=
-
ENETUNREACH
&&
ret
!=
-
EHOSTUNREACH
)
if
(
ret
!=
-
ENETUNREACH
&&
ret
!=
-
EHOSTUNREACH
)
break
;
break
;
}
}
if
(
ret
<
0
)
goto
out
;
sys_setsockopt
(
ret
,
SOL_SOCKET
,
SO_BSDCOMPAT
,
(
char
*
)
&
one
,
sizeof
(
one
));
out:
return
ret
;
return
ret
;
}
}
...
...
arch/sparc64/kernel/systbls.S
View file @
d64a850d
...
@@ -173,7 +173,7 @@ sunos_sys_table:
...
@@ -173,7 +173,7 @@ sunos_sys_table:
.
word
compat_sys_getitimer
,
sys_gethostname
,
sys_sethostname
.
word
compat_sys_getitimer
,
sys_gethostname
,
sys_sethostname
.
word
sunos_getdtablesize
,
sys_dup2
,
sunos_nop
.
word
sunos_getdtablesize
,
sys_dup2
,
sunos_nop
.
word
sys32_fcntl
,
sunos_select
,
sunos_nop
.
word
sys32_fcntl
,
sunos_select
,
sunos_nop
.
word
sys_fsync
,
sys_setpriority32
,
s
uno
s_socket
.
word
sys_fsync
,
sys_setpriority32
,
s
y
s_socket
.
word
sys_connect
,
sunos_accept
.
word
sys_connect
,
sunos_accept
/*
100
*/
.
word
sys_getpriority
,
sunos_send
,
sunos_recv
/*
100
*/
.
word
sys_getpriority
,
sunos_send
,
sunos_recv
.
word
sunos_nosys
,
sys_bind
,
sunos_setsockopt
.
word
sunos_nosys
,
sys_bind
,
sunos_setsockopt
...
...
include/net/sock.h
View file @
d64a850d
...
@@ -70,7 +70,6 @@ enum {
...
@@ -70,7 +70,6 @@ enum {
SOCK_LINGER
,
SOCK_LINGER
,
SOCK_DESTROY
,
SOCK_DESTROY
,
SOCK_BROADCAST
,
SOCK_BROADCAST
,
SOCK_BSDISM
,
};
};
/* Define this to get the sk->debug debugging facility. */
/* Define this to get the sk->debug debugging facility. */
...
...
net/core/sock.c
View file @
d64a850d
...
@@ -153,6 +153,12 @@ static int sock_set_timeout(long *timeo_p, char *optval, int optlen)
...
@@ -153,6 +153,12 @@ static int sock_set_timeout(long *timeo_p, char *optval, int optlen)
return
0
;
return
0
;
}
}
static
void
sock_warn_obsolete_bsdism
(
const
char
*
name
)
{
printk
(
KERN_WARNING
"process `%s' is using obsolete "
"%s SO_BSDCOMPAT
\n
"
,
current
->
comm
,
name
);
}
/*
/*
* This is meant for all protocols to use and covers goings on
* This is meant for all protocols to use and covers goings on
* at the socket level. Everything here is generic.
* at the socket level. Everything here is generic.
...
@@ -303,7 +309,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
...
@@ -303,7 +309,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
break
;
break
;
case
SO_BSDCOMPAT
:
case
SO_BSDCOMPAT
:
sock_
valbool_flag
(
sk
,
SOCK_BSDISM
,
valbool
);
sock_
warn_obsolete_bsdism
(
"setsockopt"
);
break
;
break
;
case
SO_PASSCRED
:
case
SO_PASSCRED
:
...
@@ -491,7 +497,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
...
@@ -491,7 +497,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
break
;
break
;
case
SO_BSDCOMPAT
:
case
SO_BSDCOMPAT
:
v
.
val
=
test_bit
(
SOCK_BSDISM
,
&
sk
->
flags
);
sock_warn_obsolete_bsdism
(
"getsockopt"
);
break
;
break
;
case
SO_TIMESTAMP
:
case
SO_TIMESTAMP
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment