patch-2.1.3 linux/net/appletalk/ddp.c

Next file: linux/net/ax25/af_ax25.c
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.2/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
@@ -2006,6 +2006,26 @@
 
 static char ddp_snap_id[]={0x08,0x00,0x07,0x80,0x9B};
 
+#ifdef CONFIG_PROC_FS
+static struct proc_dir_entry proc_appletalk = {
+	PROC_NET_ATALK, 9, "appletalk",
+	S_IFREG | S_IRUGO, 1, 0, 0,
+	0, &proc_net_inode_operations,
+	atalk_get_info
+};
+static struct proc_dir_entry proc_atalk_route = {
+	PROC_NET_AT_ROUTE, 11,"atalk_route",
+	S_IFREG | S_IRUGO, 1, 0, 0,
+	0, &proc_net_inode_operations,
+	atalk_rt_get_info
+};
+static struct proc_dir_entry proc_atalk_iface = {
+	PROC_NET_ATIF, 11,"atalk_iface",
+	S_IFREG | S_IRUGO, 1, 0, 0,
+	0, &proc_net_inode_operations,
+	atalk_if_get_info
+};
+#endif
 
 /* Called by proto.c on kernel start up */
 
@@ -2025,24 +2045,9 @@
 	aarp_proto_init();
 
 #ifdef CONFIG_PROC_FS
-	proc_net_register(&(struct proc_dir_entry) {
-		PROC_NET_ATALK, 9, "appletalk",
-		S_IFREG | S_IRUGO, 1, 0, 0,
-		0, &proc_net_inode_operations,
-		atalk_get_info
-	});
-	proc_net_register(&(struct proc_dir_entry) {
-		PROC_NET_AT_ROUTE, 11,"atalk_route",
-		S_IFREG | S_IRUGO, 1, 0, 0,
-		0, &proc_net_inode_operations,
-		atalk_rt_get_info
-	});
-	proc_net_register(&(struct proc_dir_entry) {
-		PROC_NET_ATIF, 11,"atalk_iface",
-		S_IFREG | S_IRUGO, 1, 0, 0,
-		0, &proc_net_inode_operations,
-		atalk_if_get_info
-	});
+	proc_net_register(&proc_appletalk);
+	proc_net_register(&proc_atalk_route);
+	proc_net_register(&proc_atalk_iface);
 #endif	
 
 	printk(KERN_INFO "Appletalk 0.17 for Linux NET3.035\n");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov