Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90456
b: refs/heads/master
c: dda6192
h: refs/heads/master
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Mar 29, 2008
1 parent 2da95f3 commit 63597a8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 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: 997feb5e7a24ce155c1d3bea9d0b5c6530bb6197
refs/heads/master: dda61925f84d89e2f2a4597d6298a05a2bc05c20
3 changes: 1 addition & 2 deletions trunk/include/net/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,15 @@ struct udp_seq_afinfo {
char *name;
sa_family_t family;
struct hlist_head *hashtable;
int (*seq_show) (struct seq_file *m, void *v);
struct file_operations *seq_fops;
struct seq_operations seq_ops;
};

struct udp_iter_state {
struct seq_net_private p;
sa_family_t family;
struct hlist_head *hashtable;
int bucket;
struct seq_operations seq_ops;
};

#ifdef CONFIG_PROC_FS
Expand Down
14 changes: 8 additions & 6 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,13 +1591,9 @@ static int udp_seq_open(struct inode *inode, struct file *file)

s->family = afinfo->family;
s->hashtable = afinfo->hashtable;
s->seq_ops.start = udp_seq_start;
s->seq_ops.next = udp_seq_next;
s->seq_ops.show = afinfo->seq_show;
s->seq_ops.stop = udp_seq_stop;
s->p.net = net;

rc = seq_open(file, &s->seq_ops);
rc = seq_open(file, &afinfo->seq_ops);
if (rc)
goto out_put_net;

Expand Down Expand Up @@ -1634,6 +1630,10 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
afinfo->seq_fops->llseek = seq_lseek;
afinfo->seq_fops->release = udp_seq_release;

afinfo->seq_ops.start = udp_seq_start;
afinfo->seq_ops.next = udp_seq_next;
afinfo->seq_ops.stop = udp_seq_stop;

p = proc_net_fops_create(net, afinfo->name, S_IRUGO, afinfo->seq_fops);
if (p)
p->data = afinfo;
Expand Down Expand Up @@ -1690,8 +1690,10 @@ static struct udp_seq_afinfo udp4_seq_afinfo = {
.name = "udp",
.family = AF_INET,
.hashtable = udp_hash,
.seq_show = udp4_seq_show,
.seq_fops = &udp4_seq_fops,
.seq_ops = {
.show = udp4_seq_show,
},
};

static int udp4_proc_init_net(struct net *net)
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv4/udplite.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ static struct udp_seq_afinfo udplite4_seq_afinfo = {
.name = "udplite",
.family = AF_INET,
.hashtable = udplite_hash,
.seq_show = udp4_seq_show,
.seq_fops = &udplite4_seq_fops,
.seq_ops = {
.show = udp4_seq_show,
},
};

static int udplite4_proc_init_net(struct net *net)
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,10 @@ static struct udp_seq_afinfo udp6_seq_afinfo = {
.name = "udp6",
.family = AF_INET6,
.hashtable = udp_hash,
.seq_show = udp6_seq_show,
.seq_fops = &udp6_seq_fops,
.seq_ops = {
.show = udp6_seq_show,
},
};

int udp6_proc_init(struct net *net)
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv6/udplite.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ static struct udp_seq_afinfo udplite6_seq_afinfo = {
.name = "udplite6",
.family = AF_INET6,
.hashtable = udplite_hash,
.seq_show = udp6_seq_show,
.seq_fops = &udplite6_seq_fops,
.seq_ops = {
.show = udp6_seq_show,
},
};

static int udplite6_proc_init_net(struct net *net)
Expand Down

0 comments on commit 63597a8

Please sign in to comment.