patch-2.3.25 linux/net/802/tr.c

Next file: linux/net/appletalk/aarp.c
Previous file: linux/mm/vmscan.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/net/802/tr.c linux/net/802/tr.c
@@ -447,7 +447,9 @@
  *	routing.
  */
  
-#ifdef CONFIG_PROC_FS
+#ifndef CONFIG_PROC_FS
+int rif_get_info(char *buffer,char **start, off_t offset, int length, int dummy)  {}
+#else
 int rif_get_info(char *buffer,char **start, off_t offset, int length, int dummy) 
 {
 	int len=0;
@@ -529,15 +531,6 @@
  *	too much for this.
  */
 
-#ifdef CONFIG_PROC_FS
-static struct proc_dir_entry tr_rif_proc = {
-	PROC_NET_TR_RIF, 6, "tr_rif",
-	S_IFREG | S_IRUGO, 1, 0, 0,
-	0, &proc_net_inode_operations,
-	rif_get_info
-};
-#endif
-
 void __init rif_init(struct net_proto *unused)
 {
 	rif_timer.expires  = RIF_TIMEOUT;
@@ -546,7 +539,5 @@
 	init_timer(&rif_timer);
 	add_timer(&rif_timer);
 
-#ifdef CONFIG_PROC_FS
-	proc_net_register(&tr_rif_proc);
-#endif
+	proc_net_create("tr_rif",0,rif_get_info);
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)