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
55abcf9f
Commit
55abcf9f
authored
Oct 08, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/acme/BK/llc-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
6f1fc71c
797ef46b
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
166 deletions
+138
-166
include/linux/atalk.h
include/linux/atalk.h
+2
-2
net/appletalk/aarp.c
net/appletalk/aarp.c
+91
-95
net/appletalk/atalk_proc.c
net/appletalk/atalk_proc.c
+4
-4
net/appletalk/ddp.c
net/appletalk/ddp.c
+32
-33
net/appletalk/sysctl_net_atalk.c
net/appletalk/sysctl_net_atalk.c
+4
-4
net/ipx/ipx_proc.c
net/ipx/ipx_proc.c
+3
-15
net/llc/llc_proc.c
net/llc/llc_proc.c
+2
-13
No files found.
include/linux/atalk.h
View file @
55abcf9f
...
@@ -199,13 +199,13 @@ extern void aarp_cleanup_module(void);
...
@@ -199,13 +199,13 @@ extern void aarp_cleanup_module(void);
#define at_sk(__sk) ((struct atalk_sock *)(__sk)->protinfo)
#define at_sk(__sk) ((struct atalk_sock *)(__sk)->protinfo)
extern
struct
sock
*
atalk_sockets
;
extern
struct
sock
*
atalk_sockets
;
extern
spin
lock_t
atalk_sockets_lock
;
extern
rw
lock_t
atalk_sockets_lock
;
extern
struct
atalk_route
*
atalk_routes
;
extern
struct
atalk_route
*
atalk_routes
;
extern
rwlock_t
atalk_routes_lock
;
extern
rwlock_t
atalk_routes_lock
;
extern
struct
atalk_iface
*
atalk_interfaces
;
extern
struct
atalk_iface
*
atalk_interfaces
;
extern
spin
lock_t
atalk_interfaces_lock
;
extern
rw
lock_t
atalk_interfaces_lock
;
extern
struct
atalk_route
atrtr_default
;
extern
struct
atalk_route
atrtr_default
;
...
...
net/appletalk/aarp.c
View file @
55abcf9f
This diff is collapsed.
Click to expand it.
net/appletalk/atalk_proc.c
View file @
55abcf9f
...
@@ -30,7 +30,7 @@ static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos)
...
@@ -30,7 +30,7 @@ static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos)
{
{
loff_t
l
=
*
pos
;
loff_t
l
=
*
pos
;
spin
_lock_bh
(
&
atalk_interfaces_lock
);
read
_lock_bh
(
&
atalk_interfaces_lock
);
return
l
?
atalk_get_interface_idx
(
--
l
)
:
(
void
*
)
1
;
return
l
?
atalk_get_interface_idx
(
--
l
)
:
(
void
*
)
1
;
}
}
...
@@ -53,7 +53,7 @@ static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos
...
@@ -53,7 +53,7 @@ static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos
static
void
atalk_seq_interface_stop
(
struct
seq_file
*
seq
,
void
*
v
)
static
void
atalk_seq_interface_stop
(
struct
seq_file
*
seq
,
void
*
v
)
{
{
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
read
_unlock_bh
(
&
atalk_interfaces_lock
);
}
}
static
int
atalk_seq_interface_show
(
struct
seq_file
*
seq
,
void
*
v
)
static
int
atalk_seq_interface_show
(
struct
seq_file
*
seq
,
void
*
v
)
...
@@ -154,7 +154,7 @@ static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
...
@@ -154,7 +154,7 @@ static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
{
{
loff_t
l
=
*
pos
;
loff_t
l
=
*
pos
;
spin
_lock_bh
(
&
atalk_sockets_lock
);
read
_lock_bh
(
&
atalk_sockets_lock
);
return
l
?
atalk_get_socket_idx
(
--
l
)
:
(
void
*
)
1
;
return
l
?
atalk_get_socket_idx
(
--
l
)
:
(
void
*
)
1
;
}
}
...
@@ -177,7 +177,7 @@ static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
...
@@ -177,7 +177,7 @@ static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
static
void
atalk_seq_socket_stop
(
struct
seq_file
*
seq
,
void
*
v
)
static
void
atalk_seq_socket_stop
(
struct
seq_file
*
seq
,
void
*
v
)
{
{
spin
_unlock_bh
(
&
atalk_sockets_lock
);
read
_unlock_bh
(
&
atalk_sockets_lock
);
}
}
static
int
atalk_seq_socket_show
(
struct
seq_file
*
seq
,
void
*
v
)
static
int
atalk_seq_socket_show
(
struct
seq_file
*
seq
,
void
*
v
)
...
...
net/appletalk/ddp.c
View file @
55abcf9f
...
@@ -73,10 +73,8 @@ extern int aarp_proxy_probe_network(struct atalk_iface *atif,
...
@@ -73,10 +73,8 @@ extern int aarp_proxy_probe_network(struct atalk_iface *atif,
struct
atalk_addr
*
sa
);
struct
atalk_addr
*
sa
);
extern
void
aarp_proxy_remove
(
struct
net_device
*
dev
,
struct
atalk_addr
*
sa
);
extern
void
aarp_proxy_remove
(
struct
net_device
*
dev
,
struct
atalk_addr
*
sa
);
#ifdef CONFIG_SYSCTL
extern
void
atalk_register_sysctl
(
void
);
extern
inline
void
atalk_register_sysctl
(
void
);
extern
void
atalk_unregister_sysctl
(
void
);
extern
inline
void
atalk_unregister_sysctl
(
void
);
#endif
/* CONFIG_SYSCTL */
struct
datalink_proto
*
ddp_dl
,
*
aarp_dl
;
struct
datalink_proto
*
ddp_dl
,
*
aarp_dl
;
static
struct
proto_ops
atalk_dgram_ops
;
static
struct
proto_ops
atalk_dgram_ops
;
...
@@ -88,29 +86,29 @@ static struct proto_ops atalk_dgram_ops;
...
@@ -88,29 +86,29 @@ static struct proto_ops atalk_dgram_ops;
\**************************************************************************/
\**************************************************************************/
struct
sock
*
atalk_sockets
;
struct
sock
*
atalk_sockets
;
spinlock_t
atalk_sockets_lock
=
SPIN
_LOCK_UNLOCKED
;
rwlock_t
atalk_sockets_lock
=
RW
_LOCK_UNLOCKED
;
extern
inline
void
atalk_insert_socket
(
struct
sock
*
sk
)
extern
inline
void
atalk_insert_socket
(
struct
sock
*
sk
)
{
{
spin
_lock_bh
(
&
atalk_sockets_lock
);
write
_lock_bh
(
&
atalk_sockets_lock
);
sk
->
next
=
atalk_sockets
;
sk
->
next
=
atalk_sockets
;
if
(
sk
->
next
)
if
(
sk
->
next
)
atalk_sockets
->
pprev
=
&
sk
->
next
;
atalk_sockets
->
pprev
=
&
sk
->
next
;
atalk_sockets
=
sk
;
atalk_sockets
=
sk
;
sk
->
pprev
=
&
atalk_sockets
;
sk
->
pprev
=
&
atalk_sockets
;
spin
_unlock_bh
(
&
atalk_sockets_lock
);
write
_unlock_bh
(
&
atalk_sockets_lock
);
}
}
extern
inline
void
atalk_remove_socket
(
struct
sock
*
sk
)
extern
inline
void
atalk_remove_socket
(
struct
sock
*
sk
)
{
{
spin
_lock_bh
(
&
atalk_sockets_lock
);
write
_lock_bh
(
&
atalk_sockets_lock
);
if
(
sk
->
pprev
)
{
if
(
sk
->
pprev
)
{
if
(
sk
->
next
)
if
(
sk
->
next
)
sk
->
next
->
pprev
=
sk
->
pprev
;
sk
->
next
->
pprev
=
sk
->
pprev
;
*
sk
->
pprev
=
sk
->
next
;
*
sk
->
pprev
=
sk
->
next
;
sk
->
pprev
=
NULL
;
sk
->
pprev
=
NULL
;
}
}
spin
_unlock_bh
(
&
atalk_sockets_lock
);
write
_unlock_bh
(
&
atalk_sockets_lock
);
}
}
static
struct
sock
*
atalk_search_socket
(
struct
sockaddr_at
*
to
,
static
struct
sock
*
atalk_search_socket
(
struct
sockaddr_at
*
to
,
...
@@ -118,7 +116,7 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to,
...
@@ -118,7 +116,7 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to,
{
{
struct
sock
*
s
;
struct
sock
*
s
;
spin
_lock_bh
(
&
atalk_sockets_lock
);
read
_lock_bh
(
&
atalk_sockets_lock
);
for
(
s
=
atalk_sockets
;
s
;
s
=
s
->
next
)
{
for
(
s
=
atalk_sockets
;
s
;
s
=
s
->
next
)
{
struct
atalk_sock
*
at
=
at_sk
(
s
);
struct
atalk_sock
*
at
=
at_sk
(
s
);
...
@@ -145,7 +143,7 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to,
...
@@ -145,7 +143,7 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to,
break
;
break
;
}
}
}
}
spin
_unlock_bh
(
&
atalk_sockets_lock
);
read
_unlock_bh
(
&
atalk_sockets_lock
);
return
s
;
return
s
;
}
}
...
@@ -164,7 +162,7 @@ static struct sock *atalk_find_or_insert_socket(struct sock *sk,
...
@@ -164,7 +162,7 @@ static struct sock *atalk_find_or_insert_socket(struct sock *sk,
{
{
struct
sock
*
s
;
struct
sock
*
s
;
spin
_lock_bh
(
&
atalk_sockets_lock
);
write
_lock_bh
(
&
atalk_sockets_lock
);
for
(
s
=
atalk_sockets
;
s
;
s
=
s
->
next
)
{
for
(
s
=
atalk_sockets
;
s
;
s
=
s
->
next
)
{
struct
atalk_sock
*
at
=
at_sk
(
s
);
struct
atalk_sock
*
at
=
at_sk
(
s
);
...
@@ -183,7 +181,7 @@ static struct sock *atalk_find_or_insert_socket(struct sock *sk,
...
@@ -183,7 +181,7 @@ static struct sock *atalk_find_or_insert_socket(struct sock *sk,
sk
->
pprev
=
&
atalk_sockets
;
sk
->
pprev
=
&
atalk_sockets
;
}
}
spin
_unlock_bh
(
&
atalk_sockets_lock
);
write
_unlock_bh
(
&
atalk_sockets_lock
);
return
s
;
return
s
;
}
}
...
@@ -225,12 +223,12 @@ extern inline void atalk_destroy_socket(struct sock *sk)
...
@@ -225,12 +223,12 @@ extern inline void atalk_destroy_socket(struct sock *sk)
* *
* *
\**************************************************************************/
\**************************************************************************/
/* Anti-deadlock ordering is
router
_lock --> iface_lock -DaveM */
/* Anti-deadlock ordering is
atalk_routes
_lock --> iface_lock -DaveM */
struct
atalk_route
*
atalk_routes
;
struct
atalk_route
*
atalk_routes
;
rwlock_t
atalk_routes_lock
=
RW_LOCK_UNLOCKED
;
rwlock_t
atalk_routes_lock
=
RW_LOCK_UNLOCKED
;
struct
atalk_iface
*
atalk_interfaces
;
struct
atalk_iface
*
atalk_interfaces
;
spinlock_t
atalk_interfaces_lock
=
SPIN
_LOCK_UNLOCKED
;
rwlock_t
atalk_interfaces_lock
=
RW
_LOCK_UNLOCKED
;
/* For probing devices or in a routerless network */
/* For probing devices or in a routerless network */
struct
atalk_route
atrtr_default
;
struct
atalk_route
atrtr_default
;
...
@@ -245,7 +243,7 @@ static void atif_drop_device(struct net_device *dev)
...
@@ -245,7 +243,7 @@ static void atif_drop_device(struct net_device *dev)
struct
atalk_iface
**
iface
=
&
atalk_interfaces
;
struct
atalk_iface
**
iface
=
&
atalk_interfaces
;
struct
atalk_iface
*
tmp
;
struct
atalk_iface
*
tmp
;
spin
_lock_bh
(
&
atalk_interfaces_lock
);
write
_lock_bh
(
&
atalk_interfaces_lock
);
while
((
tmp
=
*
iface
)
!=
NULL
)
{
while
((
tmp
=
*
iface
)
!=
NULL
)
{
if
(
tmp
->
dev
==
dev
)
{
if
(
tmp
->
dev
==
dev
)
{
*
iface
=
tmp
->
next
;
*
iface
=
tmp
->
next
;
...
@@ -255,7 +253,7 @@ static void atif_drop_device(struct net_device *dev)
...
@@ -255,7 +253,7 @@ static void atif_drop_device(struct net_device *dev)
}
else
}
else
iface
=
&
tmp
->
next
;
iface
=
&
tmp
->
next
;
}
}
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
write
_unlock_bh
(
&
atalk_interfaces_lock
);
}
}
static
struct
atalk_iface
*
atif_add_device
(
struct
net_device
*
dev
,
static
struct
atalk_iface
*
atif_add_device
(
struct
net_device
*
dev
,
...
@@ -274,10 +272,10 @@ static struct atalk_iface *atif_add_device(struct net_device *dev,
...
@@ -274,10 +272,10 @@ static struct atalk_iface *atif_add_device(struct net_device *dev,
iface
->
address
=
*
sa
;
iface
->
address
=
*
sa
;
iface
->
status
=
0
;
iface
->
status
=
0
;
spin
_lock_bh
(
&
atalk_interfaces_lock
);
write
_lock_bh
(
&
atalk_interfaces_lock
);
iface
->
next
=
atalk_interfaces
;
iface
->
next
=
atalk_interfaces
;
atalk_interfaces
=
iface
;
atalk_interfaces
=
iface
;
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
write
_unlock_bh
(
&
atalk_interfaces_lock
);
out:
out:
return
iface
;
return
iface
;
out_mem:
out_mem:
...
@@ -394,7 +392,7 @@ static struct atalk_addr *atalk_find_primary(void)
...
@@ -394,7 +392,7 @@ static struct atalk_addr *atalk_find_primary(void)
* Return a point-to-point interface only if
* Return a point-to-point interface only if
* there is no non-ptp interface available.
* there is no non-ptp interface available.
*/
*/
spin
_lock_bh
(
&
atalk_interfaces_lock
);
read
_lock_bh
(
&
atalk_interfaces_lock
);
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
if
(
!
fiface
&&
!
(
iface
->
dev
->
flags
&
IFF_LOOPBACK
))
if
(
!
fiface
&&
!
(
iface
->
dev
->
flags
&
IFF_LOOPBACK
))
fiface
=
iface
;
fiface
=
iface
;
...
@@ -411,7 +409,7 @@ static struct atalk_addr *atalk_find_primary(void)
...
@@ -411,7 +409,7 @@ static struct atalk_addr *atalk_find_primary(void)
else
else
retval
=
NULL
;
retval
=
NULL
;
out:
out:
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
read
_unlock_bh
(
&
atalk_interfaces_lock
);
return
retval
;
return
retval
;
}
}
...
@@ -442,7 +440,7 @@ static struct atalk_iface *atalk_find_interface(int net, int node)
...
@@ -442,7 +440,7 @@ static struct atalk_iface *atalk_find_interface(int net, int node)
{
{
struct
atalk_iface
*
iface
;
struct
atalk_iface
*
iface
;
spin
_lock_bh
(
&
atalk_interfaces_lock
);
read
_lock_bh
(
&
atalk_interfaces_lock
);
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
if
((
node
==
ATADDR_BCAST
||
if
((
node
==
ATADDR_BCAST
||
node
==
ATADDR_ANYNODE
||
node
==
ATADDR_ANYNODE
||
...
@@ -457,7 +455,7 @@ static struct atalk_iface *atalk_find_interface(int net, int node)
...
@@ -457,7 +455,7 @@ static struct atalk_iface *atalk_find_interface(int net, int node)
ntohs
(
net
)
<=
ntohs
(
iface
->
nets
.
nr_lastnet
))
ntohs
(
net
)
<=
ntohs
(
iface
->
nets
.
nr_lastnet
))
break
;
break
;
}
}
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
read
_unlock_bh
(
&
atalk_interfaces_lock
);
return
iface
;
return
iface
;
}
}
...
@@ -574,7 +572,7 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
...
@@ -574,7 +572,7 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
if
(
!
devhint
)
{
if
(
!
devhint
)
{
riface
=
NULL
;
riface
=
NULL
;
spin
_lock_bh
(
&
atalk_interfaces_lock
);
read
_lock_bh
(
&
atalk_interfaces_lock
);
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
for
(
iface
=
atalk_interfaces
;
iface
;
iface
=
iface
->
next
)
{
if
(
!
riface
&&
if
(
!
riface
&&
ntohs
(
ga
->
sat_addr
.
s_net
)
>=
ntohs
(
ga
->
sat_addr
.
s_net
)
>=
...
@@ -587,7 +585,7 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
...
@@ -587,7 +585,7 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
ga
->
sat_addr
.
s_node
==
iface
->
address
.
s_node
)
ga
->
sat_addr
.
s_node
==
iface
->
address
.
s_node
)
riface
=
iface
;
riface
=
iface
;
}
}
spin
_unlock_bh
(
&
atalk_interfaces_lock
);
read
_unlock_bh
(
&
atalk_interfaces_lock
);
retval
=
-
ENETUNREACH
;
retval
=
-
ENETUNREACH
;
if
(
!
riface
)
if
(
!
riface
)
...
@@ -1042,7 +1040,7 @@ static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
...
@@ -1042,7 +1040,7 @@ static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
struct
sock
*
s
;
struct
sock
*
s
;
int
retval
;
int
retval
;
spin
_lock_bh
(
&
atalk_sockets_lock
);
write
_lock_bh
(
&
atalk_sockets_lock
);
for
(
sat
->
sat_port
=
ATPORT_RESERVED
;
for
(
sat
->
sat_port
=
ATPORT_RESERVED
;
sat
->
sat_port
<
ATPORT_LAST
;
sat
->
sat_port
<
ATPORT_LAST
;
...
@@ -1071,7 +1069,7 @@ try_next_port:;
...
@@ -1071,7 +1069,7 @@ try_next_port:;
retval
=
-
EBUSY
;
retval
=
-
EBUSY
;
out:
out:
spin
_unlock_bh
(
&
atalk_sockets_lock
);
write
_unlock_bh
(
&
atalk_sockets_lock
);
return
retval
;
return
retval
;
}
}
...
@@ -1831,13 +1829,18 @@ EXPORT_SYMBOL(aarp_send_ddp);
...
@@ -1831,13 +1829,18 @@ EXPORT_SYMBOL(aarp_send_ddp);
EXPORT_SYMBOL
(
atrtr_get_dev
);
EXPORT_SYMBOL
(
atrtr_get_dev
);
EXPORT_SYMBOL
(
atalk_find_dev_addr
);
EXPORT_SYMBOL
(
atalk_find_dev_addr
);
static
char
atalk_banner
[]
__initdata
=
KERN_INFO
"NET4: AppleTalk 0.20 for Linux NET4.0
\n
"
;
static
char
atalk_err_snap
[]
__initdata
=
KERN_CRIT
"Unable to register DDP with SNAP.
\n
"
;
/* Called by proto.c on kernel start up */
/* Called by proto.c on kernel start up */
static
int
__init
atalk_init
(
void
)
static
int
__init
atalk_init
(
void
)
{
{
(
void
)
sock_register
(
&
atalk_family_ops
);
(
void
)
sock_register
(
&
atalk_family_ops
);
ddp_dl
=
register_snap_client
(
ddp_snap_id
,
atalk_rcv
);
ddp_dl
=
register_snap_client
(
ddp_snap_id
,
atalk_rcv
);
if
(
!
ddp_dl
)
if
(
!
ddp_dl
)
printk
(
KERN_CRIT
"Unable to register DDP with SNAP.
\n
"
);
printk
(
atalk_err_snap
);
dev_add_pack
(
&
ltalk_packet_type
);
dev_add_pack
(
&
ltalk_packet_type
);
dev_add_pack
(
&
ppptalk_packet_type
);
dev_add_pack
(
&
ppptalk_packet_type
);
...
@@ -1848,15 +1851,12 @@ static int __init atalk_init(void)
...
@@ -1848,15 +1851,12 @@ static int __init atalk_init(void)
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
aarp_register_proc_fs
();
aarp_register_proc_fs
();
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
#ifdef CONFIG_SYSCTL
atalk_register_sysctl
();
atalk_register_sysctl
();
#endif
/* CONFIG_SYSCTL */
printk
(
atalk_banner
);
printk
(
KERN_INFO
"NET4: AppleTalk 0.20 for Linux NET4.0
\n
"
);
return
0
;
return
0
;
}
}
module_init
(
atalk_init
);
module_init
(
atalk_init
);
#ifdef MODULE
/*
/*
* Note on MOD_{INC,DEC}_USE_COUNT:
* Note on MOD_{INC,DEC}_USE_COUNT:
*
*
...
@@ -1886,7 +1886,6 @@ static void __exit atalk_exit(void)
...
@@ -1886,7 +1886,6 @@ static void __exit atalk_exit(void)
sock_unregister
(
PF_APPLETALK
);
sock_unregister
(
PF_APPLETALK
);
}
}
module_exit
(
atalk_exit
);
module_exit
(
atalk_exit
);
#endif
/* MODULE */
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Alan Cox <Alan.Cox@linux.org>"
);
MODULE_AUTHOR
(
"Alan Cox <Alan.Cox@linux.org>"
);
...
...
net/appletalk/sysctl_net_atalk.c
View file @
55abcf9f
...
@@ -7,14 +7,14 @@
...
@@ -7,14 +7,14 @@
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <linux/sysctl.h>
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
extern
int
sysctl_aarp_expiry_time
;
extern
int
sysctl_aarp_expiry_time
;
extern
int
sysctl_aarp_tick_time
;
extern
int
sysctl_aarp_tick_time
;
extern
int
sysctl_aarp_retransmit_limit
;
extern
int
sysctl_aarp_retransmit_limit
;
extern
int
sysctl_aarp_resolve_time
;
extern
int
sysctl_aarp_resolve_time
;
#ifdef CONFIG_SYSCTL
static
struct
ctl_table
atalk_table
[]
=
{
static
struct
ctl_table
atalk_table
[]
=
{
{
{
.
ctl_name
=
NET_ATALK_AARP_EXPIRY_TIME
,
.
ctl_name
=
NET_ATALK_AARP_EXPIRY_TIME
,
...
@@ -83,7 +83,7 @@ void atalk_unregister_sysctl(void)
...
@@ -83,7 +83,7 @@ void atalk_unregister_sysctl(void)
unregister_sysctl_table
(
atalk_table_header
);
unregister_sysctl_table
(
atalk_table_header
);
}
}
#else
#else
/* CONFIG_PROC_FS */
void
atalk_register_sysctl
(
void
)
void
atalk_register_sysctl
(
void
)
{
{
}
}
...
@@ -91,4 +91,4 @@ void atalk_register_sysctl(void)
...
@@ -91,4 +91,4 @@ void atalk_register_sysctl(void)
void
atalk_unregister_sysctl
(
void
)
void
atalk_unregister_sysctl
(
void
)
{
{
}
}
#endif
#endif
/* CONFIG_PROC_FS */
net/ipx/ipx_proc.c
View file @
55abcf9f
...
@@ -315,15 +315,6 @@ static struct file_operations ipx_seq_socket_fops = {
...
@@ -315,15 +315,6 @@ static struct file_operations ipx_seq_socket_fops = {
.
release
=
seq_release
,
.
release
=
seq_release
,
};
};
static
int
ipx_proc_perms
(
struct
inode
*
inode
,
int
op
)
{
return
0
;
}
static
struct
inode_operations
ipx_seq_inode
=
{
.
permission
=
ipx_proc_perms
,
};
static
struct
proc_dir_entry
*
ipx_proc_dir
;
static
struct
proc_dir_entry
*
ipx_proc_dir
;
int
__init
ipx_proc_init
(
void
)
int
__init
ipx_proc_init
(
void
)
...
@@ -335,24 +326,21 @@ int __init ipx_proc_init(void)
...
@@ -335,24 +326,21 @@ int __init ipx_proc_init(void)
if
(
!
ipx_proc_dir
)
if
(
!
ipx_proc_dir
)
goto
out
;
goto
out
;
p
=
create_proc_entry
(
"interface"
,
0
,
ipx_proc_dir
);
p
=
create_proc_entry
(
"interface"
,
S_IRUGO
,
ipx_proc_dir
);
if
(
!
p
)
if
(
!
p
)
goto
out_interface
;
goto
out_interface
;
p
->
proc_fops
=
&
ipx_seq_interface_fops
;
p
->
proc_fops
=
&
ipx_seq_interface_fops
;
p
->
proc_iops
=
&
ipx_seq_inode
;
p
=
create_proc_entry
(
"route"
,
S_IRUGO
,
ipx_proc_dir
);
p
=
create_proc_entry
(
"route"
,
0
,
ipx_proc_dir
);
if
(
!
p
)
if
(
!
p
)
goto
out_route
;
goto
out_route
;
p
->
proc_fops
=
&
ipx_seq_route_fops
;
p
->
proc_fops
=
&
ipx_seq_route_fops
;
p
->
proc_iops
=
&
ipx_seq_inode
;
p
=
create_proc_entry
(
"socket"
,
S_IRUGO
,
ipx_proc_dir
);
p
=
create_proc_entry
(
"socket"
,
0
,
ipx_proc_dir
);
if
(
!
p
)
if
(
!
p
)
goto
out_socket
;
goto
out_socket
;
p
->
proc_fops
=
&
ipx_seq_socket_fops
;
p
->
proc_fops
=
&
ipx_seq_socket_fops
;
p
->
proc_iops
=
&
ipx_seq_inode
;
rc
=
0
;
rc
=
0
;
out:
out:
...
...
net/llc/llc_proc.c
View file @
55abcf9f
...
@@ -211,11 +211,6 @@ static int llc_seq_core_open(struct inode *inode, struct file *file)
...
@@ -211,11 +211,6 @@ static int llc_seq_core_open(struct inode *inode, struct file *file)
return
seq_open
(
file
,
&
llc_seq_core_ops
);
return
seq_open
(
file
,
&
llc_seq_core_ops
);
}
}
static
int
llc_proc_perms
(
struct
inode
*
inode
,
int
op
)
{
return
0
;
}
static
struct
file_operations
llc_seq_socket_fops
=
{
static
struct
file_operations
llc_seq_socket_fops
=
{
.
open
=
llc_seq_socket_open
,
.
open
=
llc_seq_socket_open
,
.
read
=
seq_read
,
.
read
=
seq_read
,
...
@@ -230,10 +225,6 @@ static struct file_operations llc_seq_core_fops = {
...
@@ -230,10 +225,6 @@ static struct file_operations llc_seq_core_fops = {
.
release
=
seq_release
,
.
release
=
seq_release
,
};
};
static
struct
inode_operations
llc_seq_inode
=
{
.
permission
=
llc_proc_perms
,
};
static
struct
proc_dir_entry
*
llc_proc_dir
;
static
struct
proc_dir_entry
*
llc_proc_dir
;
int
__init
llc_proc_init
(
void
)
int
__init
llc_proc_init
(
void
)
...
@@ -245,19 +236,17 @@ int __init llc_proc_init(void)
...
@@ -245,19 +236,17 @@ int __init llc_proc_init(void)
if
(
!
llc_proc_dir
)
if
(
!
llc_proc_dir
)
goto
out
;
goto
out
;
p
=
create_proc_entry
(
"socket"
,
0
,
llc_proc_dir
);
p
=
create_proc_entry
(
"socket"
,
S_IRUGO
,
llc_proc_dir
);
if
(
!
p
)
if
(
!
p
)
goto
out_socket
;
goto
out_socket
;
p
->
proc_fops
=
&
llc_seq_socket_fops
;
p
->
proc_fops
=
&
llc_seq_socket_fops
;
p
->
proc_iops
=
&
llc_seq_inode
;
p
=
create_proc_entry
(
"core"
,
0
,
llc_proc_dir
);
p
=
create_proc_entry
(
"core"
,
S_IRUGO
,
llc_proc_dir
);
if
(
!
p
)
if
(
!
p
)
goto
out_core
;
goto
out_core
;
p
->
proc_fops
=
&
llc_seq_core_fops
;
p
->
proc_fops
=
&
llc_seq_core_fops
;
p
->
proc_iops
=
&
llc_seq_inode
;
rc
=
0
;
rc
=
0
;
out:
out:
...
...
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