DORMANTno replies

[PATCH] fib_hash -- proc_net_fops_create

From: Stephen Hemminger <hidden>
Date: 2003-09-11 22:41:56

Once again, use proc_net_fops_create for convience

diff -Nru a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
--- a/net/ipv4/fib_hash.c	Thu Sep 11 15:36:06 2003
+++ b/net/ipv4/fib_hash.c	Thu Sep 11 15:36:06 2003
@@ -1096,15 +1096,8 @@
 
 int __init fib_proc_init(void)
 {
-	struct proc_dir_entry *p;
-	int rc = 0;
-
-	p = create_proc_entry("route", S_IRUGO, proc_net);
-	if (p)
-		p->proc_fops = &fib_seq_fops;
-	else
-		rc = -ENOMEM;
-	return rc;
+	return proc_net_fops_create("route", S_IRUGO, &fib_seq_fops) ? 0
+		: -ENOMEM;
 }
 
 void __init fib_proc_exit(void)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help