DORMANTno replies

[PATCH] ipv4/raw -- proc_net_fops_create

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

diff -Nru a/net/ipv4/raw.c b/net/ipv4/raw.c
--- a/net/ipv4/raw.c	Thu Sep 11 15:36:06 2003
+++ b/net/ipv4/raw.c	Thu Sep 11 15:36:06 2003
@@ -831,15 +831,7 @@
 
 int __init raw_proc_init(void)
 {
-	struct proc_dir_entry *p;
-	int rc = 0;
-
-	p = create_proc_entry("raw", S_IRUGO, proc_net);
-	if (p)
-		p->proc_fops = &raw_seq_fops;
-	else
-		rc = -ENOMEM;
-	return rc;
+	return proc_net_fops_create("raw", S_IRUGO, &raw_seq_fops) ? 0 : -ENOMEM;
 }
 
 void __init raw_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