mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
37d849bb42
commit
f455022166
3 changed files with 38 additions and 60 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue