From: Hans Grobler (fpn@bayhealth.org)
Date: Mon Dec 18 2000 - 18:14:03 EET
rose-2.4.0-test13-pre3-patch-v1:
= rose.h:
- rose_register_sysctl, rose_unregister_sysctl:
wrapped in conditional that will handle the case when
sysctl is not configured.
= af_rose.c:
- rose_proto_init, rose_exit:
removed CONFIG_SYSCTL conditionals (making code cleaner?)
= rose_dev.c, rose_in.c, rose_link.c, rose_out.c, rose_subr.c,
rose_timer.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
= rose_loopback.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- rose_loopback_clear:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
= rose_route.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- rose_node_list, rose_neigh_list, rose_route_list,
rose_loopback_neigh:
removed explicit initialization as per linux 2.4.
- rose_rt_free:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
af_rose.c-2.4.0-test13-pre2-patch-v1:
- CONFIG_ROSE, CONFIG_ROSE_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- rose_proto_init, rose_exit:
removed conditionals for PROC_FS as the PROC_FS headers do
the right thing if PROC_FS is not selected.
- rose_proto_init:
update kernel version number in signon banner
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/include/net/rose.h linux-2.4.0-test13-pre3/include/net/rose.h
--- linux-2.4.0-test13-pre3.orig/include/net/rose.h Mon Oct 16 21:42:53 2000
+++ linux-2.4.0-test13-pre3/include/net/rose.h Mon Dec 18 17:38:56 2000
@@ -233,7 +233,12 @@
extern void rose_stop_idletimer(struct sock *);
/* sysctl_net_rose.c */
+#ifdef CONFIG_SYSCTL
extern void rose_register_sysctl(void);
extern void rose_unregister_sysctl(void);
+#else
+extern inline void rose_register_sysctl(void) {};
+extern inline void rose_unregister_sysctl(void) {};
+#endif /* CONFIG_SYSCTL */
#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/af_rose.c linux-2.4.0-test13-pre3/net/rose/af_rose.c
--- linux-2.4.0-test13-pre3.orig/net/rose/af_rose.c Mon Oct 16 21:42:54 2000
+++ linux-2.4.0-test13-pre3/net/rose/af_rose.c Mon Dec 18 17:35:34 2000
@@ -25,7 +25,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
@@ -1448,29 +1447,24 @@
sock_register(&rose_family_ops);
register_netdevice_notifier(&rose_dev_notifier);
- printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.62 for AX25.037 Linux 2.1\n");
+ printk(KERN_INFO "F6FBB/G4KLX ROSE for Linux. Version 0.62 for AX25.037 Linux 2.4\n");
ax25_protocol_register(AX25_P_ROSE, rose_route_frame);
ax25_linkfail_register(rose_link_failed);
-#ifdef CONFIG_SYSCTL
rose_register_sysctl();
-#endif
rose_loopback_init();
rose_add_loopback_neigh();
-#ifdef CONFIG_PROC_FS
proc_net_create("rose", 0, rose_get_info);
proc_net_create("rose_neigh", 0, rose_neigh_get_info);
proc_net_create("rose_nodes", 0, rose_nodes_get_info);
proc_net_create("rose_routes", 0, rose_routes_get_info);
-#endif
return 0;
}
module_init(rose_proto_init);
-#ifdef MODULE
EXPORT_NO_SYMBOLS;
MODULE_PARM(rose_ndevs, "i");
@@ -1483,12 +1477,10 @@
{
int i;
-#ifdef CONFIG_PROC_FS
proc_net_remove("rose");
proc_net_remove("rose_neigh");
proc_net_remove("rose_nodes");
proc_net_remove("rose_routes");
-#endif
rose_loopback_clear();
rose_rt_free();
@@ -1499,9 +1491,7 @@
if (ax25cmp(&rose_callsign, &null_ax25_address) != 0)
ax25_listen_release(&rose_callsign, NULL);
-#ifdef CONFIG_SYSCTL
rose_unregister_sysctl();
-#endif
unregister_netdevice_notifier(&rose_dev_notifier);
sock_unregister(PF_ROSE);
@@ -1518,7 +1508,4 @@
kfree(dev_rose);
}
module_exit(rose_exit);
-#endif /* MODULE */
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_dev.c linux-2.4.0-test13-pre3/net/rose/rose_dev.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_dev.c Thu Feb 17 19:18:47 2000
+++ linux-2.4.0-test13-pre3/net/rose/rose_dev.c Mon Dec 18 17:35:34 2000
@@ -15,7 +15,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/proc_fs.h>
@@ -205,5 +204,3 @@
return 0;
};
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_in.c linux-2.4.0-test13-pre3/net/rose/rose_in.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_in.c Sun Apr 12 02:18:16 1998
+++ linux-2.4.0-test13-pre3/net/rose/rose_in.c Mon Dec 18 17:35:34 2000
@@ -23,7 +23,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -303,5 +302,3 @@
return queued;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_link.c linux-2.4.0-test13-pre3/net/rose/rose_link.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_link.c Thu May 4 20:28:23 2000
+++ linux-2.4.0-test13-pre3/net/rose/rose_link.c Mon Dec 18 17:35:34 2000
@@ -15,7 +15,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -322,5 +321,3 @@
}
}
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_loopback.c linux-2.4.0-test13-pre3/net/rose/rose_loopback.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_loopback.c Thu May 4 20:28:47 2000
+++ linux-2.4.0-test13-pre3/net/rose/rose_loopback.c Mon Dec 18 17:35:34 2000
@@ -15,13 +15,13 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/timer.h>
#include <net/ax25.h>
#include <linux/skbuff.h>
#include <net/rose.h>
+#include <linux/init.h>
static struct sk_buff_head loopback_queue;
static struct timer_list loopback_timer;
@@ -107,9 +107,7 @@
}
}
-#ifdef MODULE
-
-void rose_loopback_clear(void)
+void __exit rose_loopback_clear(void)
{
struct sk_buff *skb;
@@ -120,7 +118,3 @@
kfree_skb(skb);
}
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_out.c linux-2.4.0-test13-pre3/net/rose/rose_out.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_out.c Mon Dec 1 00:00:40 1997
+++ linux-2.4.0-test13-pre3/net/rose/rose_out.c Mon Dec 18 17:35:34 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -130,5 +129,3 @@
rose_stop_timer(sk);
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_route.c linux-2.4.0-test13-pre3/net/rose/rose_route.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_route.c Fri Nov 19 21:33:29 1999
+++ linux-2.4.0-test13-pre3/net/rose/rose_route.c Mon Dec 18 17:35:34 2000
@@ -20,7 +20,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -47,15 +46,16 @@
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/netfilter.h>
+#include <linux/init.h>
#include <net/rose.h>
static unsigned int rose_neigh_no = 1;
-static struct rose_node *rose_node_list = NULL;
-static struct rose_neigh *rose_neigh_list = NULL;
-static struct rose_route *rose_route_list = NULL;
+static struct rose_node *rose_node_list;
+static struct rose_neigh *rose_neigh_list;
+static struct rose_route *rose_route_list;
-struct rose_neigh *rose_loopback_neigh = NULL;
+struct rose_neigh *rose_loopback_neigh;
static void rose_remove_neigh(struct rose_neigh *);
@@ -1126,12 +1126,10 @@
return len;
}
-#ifdef MODULE
-
/*
* Release all memory associated with ROSE routing structures.
*/
-void rose_rt_free(void)
+void __exit rose_rt_free(void)
{
struct rose_neigh *s, *rose_neigh = rose_neigh_list;
struct rose_node *t, *rose_node = rose_node_list;
@@ -1158,7 +1156,3 @@
rose_remove_route(u);
}
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_subr.c linux-2.4.0-test13-pre3/net/rose/rose_subr.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_subr.c Thu Oct 8 00:52:55 1998
+++ linux-2.4.0-test13-pre3/net/rose/rose_subr.c Mon Dec 18 17:35:34 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -528,5 +527,3 @@
sk->dead = 1;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/rose/rose_timer.c linux-2.4.0-test13-pre3/net/rose/rose_timer.c
--- linux-2.4.0-test13-pre3.orig/net/rose/rose_timer.c Mon Jul 7 17:20:00 1997
+++ linux-2.4.0-test13-pre3/net/rose/rose_timer.c Mon Dec 18 17:35:34 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_ROSE) || defined(CONFIG_ROSE_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -207,5 +206,3 @@
sk->dead = 1;
}
-
-#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to pjctafu.rwaireu@fcpl.org
This archive was generated by hypermail 2b30 : Mon Dec 18 2000 - 18:15:01 EET