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
a763d83a
Commit
a763d83a
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/core.
parent
72af4165
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
net/core/dev.c
net/core/dev.c
+4
-9
No files found.
net/core/dev.c
View file @
a763d83a
...
@@ -1994,26 +1994,21 @@ extern int wireless_proc_init(void);
...
@@ -1994,26 +1994,21 @@ extern int wireless_proc_init(void);
static
int
__init
dev_proc_init
(
void
)
static
int
__init
dev_proc_init
(
void
)
{
{
struct
proc_dir_entry
*
p
;
int
rc
=
-
ENOMEM
;
int
rc
=
-
ENOMEM
;
p
=
create_proc_entry
(
"dev"
,
S_IRUGO
,
proc_net
);
if
(
!
proc_net_fops_create
(
"dev"
,
S_IRUGO
,
&
dev_seq_fops
))
if
(
!
p
)
goto
out
;
goto
out
;
p
->
proc_fops
=
&
dev_seq_fops
;
if
(
!
proc_net_fops_create
(
"softnet_stat"
,
S_IRUGO
,
&
softnet_seq_fops
))
p
=
create_proc_entry
(
"softnet_stat"
,
S_IRUGO
,
proc_net
);
if
(
!
p
)
goto
out_dev
;
goto
out_dev
;
p
->
proc_fops
=
&
softnet_seq_fops
;
if
(
wireless_proc_init
())
if
(
wireless_proc_init
())
goto
out_softnet
;
goto
out_softnet
;
rc
=
0
;
rc
=
0
;
out:
out:
return
rc
;
return
rc
;
out_softnet:
out_softnet:
remove_proc_entry
(
"softnet_stat"
,
proc_net
);
proc_net_remove
(
"softnet_stat"
);
out_dev:
out_dev:
remove_proc_entry
(
"dev"
,
proc_net
);
proc_net_remove
(
"dev"
);
goto
out
;
goto
out
;
}
}
#else
#else
...
...
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