proc_net_fops_create() -> proc_create()
This commit is contained in:
parent
1f6e261bd4
commit
1747f1a57b
13
tr.c
13
tr.c
|
@ -581,12 +581,11 @@ static int rif_seq_open(struct inode *inode, struct file *file)
|
|||
return seq_open(file, &rif_seq_ops);
|
||||
}
|
||||
|
||||
static const struct file_operations rif_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = rif_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
static const struct proc_ops rif_seq_fops = {
|
||||
.proc_open = rif_seq_open,
|
||||
.proc_read = seq_read,
|
||||
.proc_lseek = seq_lseek,
|
||||
.proc_release = seq_release,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -664,7 +663,7 @@ static int __init rif_init(void)
|
|||
#ifdef CONFIG_SYSCTL
|
||||
register_sysctl_paths(tr_path, tr_table);
|
||||
#endif
|
||||
proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops);
|
||||
proc_create("tr_rif", S_IRUGO, init_net.proc_net, &rif_seq_fops);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue