Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90017
b: refs/heads/master
c: 69ddb80
h: refs/heads/master
i:
  90015: 5fdf59f
v: v3
  • Loading branch information
Daniel Lezcano authored and David S. Miller committed Mar 4, 2008
1 parent ea88779 commit cc58155
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 606a2b4862d4be31fa55cad89871fe52a422d511
refs/heads/master: 69ddb80562a460d6d9edafe33a5bee06ca18b1a1
26 changes: 18 additions & 8 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,29 +2353,39 @@ static const struct file_operations ipv6_route_proc_fops = {

static int rt6_stats_seq_show(struct seq_file *seq, void *v)
{
struct net *net = (struct net *)seq->private;
seq_printf(seq, "%04x %04x %04x %04x %04x %04x %04x\n",
init_net.ipv6.rt6_stats->fib_nodes,
init_net.ipv6.rt6_stats->fib_route_nodes,
init_net.ipv6.rt6_stats->fib_rt_alloc,
init_net.ipv6.rt6_stats->fib_rt_entries,
init_net.ipv6.rt6_stats->fib_rt_cache,
net->ipv6.rt6_stats->fib_nodes,
net->ipv6.rt6_stats->fib_route_nodes,
net->ipv6.rt6_stats->fib_rt_alloc,
net->ipv6.rt6_stats->fib_rt_entries,
net->ipv6.rt6_stats->fib_rt_cache,
atomic_read(&ip6_dst_ops.entries),
init_net.ipv6.rt6_stats->fib_discarded_routes);
net->ipv6.rt6_stats->fib_discarded_routes);

return 0;
}

static int rt6_stats_seq_open(struct inode *inode, struct file *file)
{
return single_open(file, rt6_stats_seq_show, NULL);
struct net *net = get_proc_net(inode);
return single_open(file, rt6_stats_seq_show, net);
}

static int rt6_stats_seq_release(struct inode *inode, struct file *file)
{
struct seq_file *seq = file->private_data;
struct net *net = (struct net *)seq->private;
put_net(net);
return single_release(inode, file);
}

static const struct file_operations rt6_stats_seq_fops = {
.owner = THIS_MODULE,
.open = rt6_stats_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.release = rt6_stats_seq_release,
};
#endif /* CONFIG_PROC_FS */

Expand Down

0 comments on commit cc58155

Please sign in to comment.