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
c7903bf6
Commit
c7903bf6
authored
Sep 11, 2003
by
Dave Jones
Committed by
Hideaki Yoshifuji
Sep 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Fix non-CONFIG_PROC_FS build.
parent
4a432d7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
10 deletions
+30
-10
net/ipv6/proc.c
net/ipv6/proc.c
+28
-10
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+2
-0
No files found.
net/ipv6/proc.c
View file @
c7903bf6
...
...
@@ -32,7 +32,6 @@
#ifdef CONFIG_PROC_FS
static
struct
proc_dir_entry
*
proc_net_devsnmp6
;
#endif
static
int
fold_prot_inuse
(
struct
proto
*
proto
)
{
...
...
@@ -58,7 +57,6 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
return
0
;
}
struct
snmp6_item
{
char
*
name
;
...
...
@@ -221,9 +219,7 @@ static struct file_operations snmp6_seq_fops = {
int
snmp6_register_dev
(
struct
inet6_dev
*
idev
)
{
int
err
=
-
ENOMEM
;
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
p
;
#endif
if
(
!
idev
||
!
idev
->
dev
)
return
-
EINVAL
;
...
...
@@ -232,7 +228,6 @@ int snmp6_register_dev(struct inet6_dev *idev)
__alignof__
(
struct
icmpv6_mib
))
<
0
)
goto
err_icmp
;
#ifdef CONFIG_PROC_FS
if
(
!
proc_net_devsnmp6
)
{
err
=
-
ENOENT
;
goto
err_proc
;
...
...
@@ -244,27 +239,22 @@ int snmp6_register_dev(struct inet6_dev *idev)
p
->
proc_fops
=
&
snmp6_seq_fops
;
idev
->
stats
.
proc_dir_entry
=
p
;
#endif
return
0
;
#ifdef CONFIG_PROC_FS
err_proc:
snmp6_mib_free
((
void
**
)
idev
->
stats
.
icmpv6
);
#endif
err_icmp:
return
err
;
}
int
snmp6_unregister_dev
(
struct
inet6_dev
*
idev
)
{
#ifdef CONFIG_PROC_FS
if
(
!
proc_net_devsnmp6
)
return
-
ENOENT
;
if
(
!
idev
||
!
idev
->
stats
.
proc_dir_entry
)
return
-
EINVAL
;
remove_proc_entry
(
idev
->
stats
.
proc_dir_entry
->
name
,
proc_net_devsnmp6
);
#endif
snmp6_mib_free
((
void
**
)
idev
->
stats
.
icmpv6
);
return
0
;
...
...
@@ -302,3 +292,31 @@ void ipv6_misc_proc_exit(void)
proc_net_remove
(
"snmp6"
);
}
#else
/* CONFIG_PROC_FS */
int
snmp6_register_dev
(
struct
inet6_dev
*
idev
)
{
int
err
=
-
ENOMEM
;
if
(
!
idev
||
!
idev
->
dev
)
return
-
EINVAL
;
if
(
snmp6_mib_init
((
void
**
)
idev
->
stats
.
icmpv6
,
sizeof
(
struct
icmpv6_mib
),
__alignof__
(
struct
icmpv6_mib
))
<
0
)
goto
err_icmp
;
return
0
;
err_icmp:
return
err
;
}
int
snmp6_unregister_dev
(
struct
inet6_dev
*
idev
)
{
snmp6_mib_free
((
void
**
)
idev
->
stats
.
icmpv6
);
return
0
;
}
#endif
net/ipv6/tcp_ipv6.c
View file @
c7903bf6
...
...
@@ -2023,6 +2023,7 @@ static void get_timewait6_sock(struct seq_file *seq,
atomic_read
(
&
tw
->
tw_refcnt
),
tw
);
}
#ifdef CONFIG_PROC_FS
static
int
tcp6_seq_show
(
struct
seq_file
*
seq
,
void
*
v
)
{
struct
tcp_iter_state
*
st
;
...
...
@@ -2072,6 +2073,7 @@ void tcp6_proc_exit(void)
{
tcp_proc_unregister
(
&
tcp6_seq_afinfo
);
}
#endif
struct
proto
tcpv6_prot
=
{
.
name
=
"TCPv6"
,
...
...
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