ipv{4,6}/ping: simplify proc file creation
Remove the pointless ping_seq_afinfo indirection and make the code look like most other protocols. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -83,20 +83,9 @@ int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
|
||||
bool ping_rcv(struct sk_buff *skb);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
struct ping_seq_afinfo {
|
||||
char *name;
|
||||
sa_family_t family;
|
||||
const struct file_operations *seq_fops;
|
||||
const struct seq_operations seq_ops;
|
||||
};
|
||||
|
||||
extern const struct file_operations ping_seq_fops;
|
||||
|
||||
void *ping_seq_start(struct seq_file *seq, loff_t *pos, sa_family_t family);
|
||||
void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos);
|
||||
void ping_seq_stop(struct seq_file *seq, void *v);
|
||||
int ping_proc_register(struct net *net, struct ping_seq_afinfo *afinfo);
|
||||
void ping_proc_unregister(struct net *net, struct ping_seq_afinfo *afinfo);
|
||||
|
||||
int __init ping_proc_init(void);
|
||||
void ping_proc_exit(void);
|
||||
|
Reference in New Issue
Block a user