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
a0abe4c8
Commit
a0abe4c8
authored
Sep 11, 2003
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Use proc_net_fops_create() and proc_net_remove() in net/ipv6.
parent
5d45f59f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
42 deletions
+15
-42
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+4
-9
net/ipv6/anycast.c
net/ipv6/anycast.c
+2
-4
net/ipv6/ip6_flowlabel.c
net/ipv6/ip6_flowlabel.c
+1
-6
net/ipv6/mcast.c
net/ipv6/mcast.c
+3
-9
net/ipv6/proc.c
net/ipv6/proc.c
+4
-9
net/ipv6/raw.c
net/ipv6/raw.c
+1
-5
No files found.
net/ipv6/addrconf.c
View file @
a0abe4c8
...
...
@@ -2259,16 +2259,11 @@ static struct file_operations if6_fops = {
int
__init
if6_proc_init
(
void
)
{
struct
proc_dir_entry
*
p
;
int
rc
=
0
;
p
=
create_proc_entry
(
"if_inet6"
,
S_IRUGO
,
proc_net
);
if
(
p
)
p
->
proc_fops
=
&
if6_fops
;
else
rc
=
-
ENOMEM
;
return
rc
;
if
(
!
proc_net_fops_create
(
"if_inet6"
,
S_IRUGO
,
&
if6_fops
))
return
-
ENOMEM
;
return
0
;
}
void
if6_proc_exit
(
void
)
{
proc_net_remove
(
"if_inet6"
);
...
...
net/ipv6/anycast.c
View file @
a0abe4c8
...
...
@@ -581,11 +581,9 @@ static struct file_operations ac6_seq_fops = {
int
__init
ac6_proc_init
(
void
)
{
struct
proc_dir_entry
*
p
;
if
(
!
proc_net_fops_create
(
"anycast6"
,
S_IRUGO
,
&
ac6_seq_fops
))
return
-
ENOMEM
;
p
=
create_proc_entry
(
"anycast6"
,
S_IRUGO
,
proc_net
);
if
(
p
)
p
->
proc_fops
=
&
ac6_seq_fops
;
return
0
;
}
...
...
net/ipv6/ip6_flowlabel.c
View file @
a0abe4c8
...
...
@@ -695,12 +695,7 @@ static struct file_operations ip6fl_seq_fops = {
void
ip6_flowlabel_init
()
{
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
p
;
#endif
#ifdef CONFIG_PROC_FS
p
=
create_proc_entry
(
"ip6_flowlabel"
,
S_IRUGO
,
proc_net
);
if
(
p
)
p
->
proc_fops
=
&
ip6fl_seq_fops
;
proc_net_fops_create
(
"ip6_flowlabel"
,
S_IRUGO
,
&
ip6fl_seq_fops
);
#endif
}
...
...
net/ipv6/mcast.c
View file @
a0abe4c8
...
...
@@ -2378,9 +2378,6 @@ int __init igmp6_init(struct net_proto_family *ops)
struct
ipv6_pinfo
*
np
;
struct
sock
*
sk
;
int
err
;
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
p
;
#endif
err
=
sock_create
(
PF_INET6
,
SOCK_RAW
,
IPPROTO_ICMPV6
,
&
igmp6_socket
);
if
(
err
<
0
)
{
...
...
@@ -2399,12 +2396,8 @@ int __init igmp6_init(struct net_proto_family *ops)
np
->
hop_limit
=
1
;
#ifdef CONFIG_PROC_FS
p
=
create_proc_entry
(
"igmp6"
,
S_IRUGO
,
proc_net
);
if
(
p
)
p
->
proc_fops
=
&
igmp6_mc_seq_fops
;
p
=
create_proc_entry
(
"mcfilter6"
,
S_IRUGO
,
proc_net
);
if
(
p
)
p
->
proc_fops
=
&
igmp6_mcf_seq_fops
;
proc_net_fops_create
(
"igmp6"
,
S_IRUGO
,
&
igmp6_mc_seq_fops
);
proc_net_fops_create
(
"mcfilter6"
,
S_IRUGO
,
&
igmp6_mcf_seq_fops
);
#endif
return
0
;
...
...
@@ -2414,6 +2407,7 @@ void igmp6_cleanup(void)
{
sock_release
(
igmp6_socket
);
igmp6_socket
=
NULL
;
/* for safety */
#ifdef CONFIG_PROC_FS
proc_net_remove
(
"mcfilter6"
);
proc_net_remove
(
"igmp6"
);
...
...
net/ipv6/proc.c
View file @
a0abe4c8
...
...
@@ -273,21 +273,16 @@ int snmp6_unregister_dev(struct inet6_dev *idev)
int
__init
ipv6_misc_proc_init
(
void
)
{
int
rc
=
0
;
struct
proc_dir_entry
*
p
;
p
=
create_proc_entry
(
"snmp6"
,
S_IRUGO
,
proc_net
);
if
(
!
p
)
if
(
!
proc_net_fops_create
(
"snmp6"
,
S_IRUGO
,
&
snmp6_seq_fops
))
goto
proc_snmp6_fail
;
else
p
->
proc_fops
=
&
snmp6_seq_fops
;
proc_net_devsnmp6
=
proc_mkdir
(
"dev_snmp6"
,
proc_net
);
if
(
!
proc_net_devsnmp6
)
goto
proc_dev_snmp6_fail
;
p
=
create_proc_entry
(
"sockstat6"
,
S_IRUGO
,
proc_net
);
if
(
!
p
)
if
(
!
p
roc_net_fops_create
(
"sockstat6"
,
S_IRUGO
,
&
sockstat6_seq_fops
)
)
goto
proc_sockstat6_fail
;
else
p
->
proc_fops
=
&
sockstat6_seq_fops
;
out:
return
rc
;
...
...
net/ipv6/raw.c
View file @
a0abe4c8
...
...
@@ -1059,12 +1059,8 @@ static struct file_operations raw6_seq_fops = {
int
__init
raw6_proc_init
(
void
)
{
struct
proc_dir_entry
*
p
=
create_proc_entry
(
"raw6"
,
S_IRUGO
,
proc_net
);
if
(
!
p
)
if
(
!
proc_net_fops_create
(
"raw6"
,
S_IRUGO
,
&
raw6_seq_fops
))
return
-
ENOMEM
;
p
->
proc_fops
=
&
raw6_seq_fops
;
return
0
;
}
...
...
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