[NET]: Consolidate net namespace related proc files creation.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
097e66c578
commit
e372c41401
@@ -63,5 +63,18 @@ extern struct list_head *seq_list_start_head(struct list_head *head,
|
||||
extern struct list_head *seq_list_next(void *v, struct list_head *head,
|
||||
loff_t *ppos);
|
||||
|
||||
struct net;
|
||||
struct seq_net_private {
|
||||
struct net *net;
|
||||
};
|
||||
|
||||
int seq_open_net(struct inode *, struct file *,
|
||||
const struct seq_operations *, int);
|
||||
int seq_release_net(struct inode *, struct file *);
|
||||
static inline struct net *seq_file_net(struct seq_file *seq)
|
||||
{
|
||||
return ((struct seq_net_private *)seq->private)->net;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user