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);
|
return seq_open(file, &rif_seq_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct file_operations rif_seq_fops = {
|
static const struct proc_ops rif_seq_fops = {
|
||||||
.owner = THIS_MODULE,
|
.proc_open = rif_seq_open,
|
||||||
.open = rif_seq_open,
|
.proc_read = seq_read,
|
||||||
.read = seq_read,
|
.proc_lseek = seq_lseek,
|
||||||
.llseek = seq_lseek,
|
.proc_release = seq_release,
|
||||||
.release = seq_release,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -664,7 +663,7 @@ static int __init rif_init(void)
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
register_sysctl_paths(tr_path, tr_table);
|
register_sysctl_paths(tr_path, tr_table);
|
||||||
#endif
|
#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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue