DORMANTno replies

[PATCH] arp - proc_net_fops_create

From: Stephen Hemminger <hidden>
Date: 2003-09-11 22:40:54

Use proc_net_fops_create for convience.

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