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
nexedi
linux
Commits
d380ed5e
Commit
d380ed5e
authored
Nov 01, 2002
by
Matthew Wilcox
Committed by
David S. Miller
Nov 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Cleanup wan/packet ioctls.
parent
a0b53804
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
52 deletions
+4
-52
net/packet/af_packet.c
net/packet/af_packet.c
+3
-27
net/wanrouter/af_wanpipe.c
net/wanrouter/af_wanpipe.c
+1
-25
No files found.
net/packet/af_packet.c
View file @
d380ed5e
...
...
@@ -1432,8 +1432,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
{
struct
sock
*
sk
=
sock
->
sk
;
switch
(
cmd
)
{
switch
(
cmd
)
{
case
SIOCOUTQ
:
{
int
amount
=
atomic_read
(
&
sk
->
wmem_alloc
);
...
...
@@ -1452,35 +1451,12 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
return
put_user
(
amount
,
(
int
*
)
arg
);
}
case
SIOCGSTAMP
:
if
(
sk
->
stamp
.
tv_sec
==
0
)
if
(
sk
->
stamp
.
tv_sec
==
0
)
return
-
ENOENT
;
if
(
copy_to_user
((
void
*
)
arg
,
&
sk
->
stamp
,
sizeof
(
struct
timeval
)))
return
-
EFAULT
;
break
;
case
SIOCGIFFLAGS
:
#ifndef CONFIG_INET
case
SIOCSIFFLAGS
:
#endif
case
SIOCGIFCONF
:
case
SIOCGIFMETRIC
:
case
SIOCSIFMETRIC
:
case
SIOCGIFMEM
:
case
SIOCSIFMEM
:
case
SIOCGIFMTU
:
case
SIOCSIFMTU
:
case
SIOCSIFLINK
:
case
SIOCGIFHWADDR
:
case
SIOCSIFHWADDR
:
case
SIOCSIFMAP
:
case
SIOCGIFMAP
:
case
SIOCSIFSLAVE
:
case
SIOCGIFSLAVE
:
case
SIOCGIFINDEX
:
case
SIOCGIFNAME
:
case
SIOCGIFCOUNT
:
case
SIOCSIFHWBROADCAST
:
return
(
dev_ioctl
(
cmd
,(
void
*
)
arg
));
#ifdef CONFIG_INET
case
SIOCADDRT
:
...
...
@@ -1501,7 +1477,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
#endif
default:
return
-
EOPNOTSUPP
;
return
dev_ioctl
(
cmd
,
(
void
*
)
arg
)
;
}
return
0
;
}
...
...
net/wanrouter/af_wanpipe.c
View file @
d380ed5e
...
...
@@ -1922,30 +1922,6 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
sock
->
file
->
f_flags
|=
O_NONBLOCK
;
return
0
;
case
SIOCGIFFLAGS
:
#ifndef CONFIG_INET
case
SIOCSIFFLAGS
:
#endif
case
SIOCGIFCONF
:
case
SIOCGIFMETRIC
:
case
SIOCSIFMETRIC
:
case
SIOCGIFMEM
:
case
SIOCSIFMEM
:
case
SIOCGIFMTU
:
case
SIOCSIFMTU
:
case
SIOCSIFLINK
:
case
SIOCGIFHWADDR
:
case
SIOCSIFHWADDR
:
case
SIOCSIFMAP
:
case
SIOCGIFMAP
:
case
SIOCSIFSLAVE
:
case
SIOCGIFSLAVE
:
case
SIOCGIFINDEX
:
case
SIOCGIFNAME
:
case
SIOCGIFCOUNT
:
case
SIOCSIFHWBROADCAST
:
return
(
dev_ioctl
(
cmd
,(
void
*
)
arg
));
#ifdef CONFIG_INET
case
SIOCADDRT
:
case
SIOCDELRT
:
...
...
@@ -1968,7 +1944,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
#endif
default:
return
-
EOPNOTSUPP
;
return
dev_ioctl
(
cmd
,(
void
*
)
arg
)
;
}
/*NOTREACHED*/
}
...
...
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