netdev
[Top] [All Lists]

[PATCH] fib_hash -- proc_net_fops_create

To: David Miller <davem@xxxxxxxxxx>
Subject: [PATCH] fib_hash -- proc_net_fops_create
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Thu, 11 Sep 2003 15:41:56 -0700
Cc: netdev@xxxxxxxxxxx
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
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)

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] fib_hash -- proc_net_fops_create, Stephen Hemminger <=