From: Hans Grobler (cvntzbe.fvdec@relay.tunkki.fi)
Date: Mon Dec 18 2000 - 18:12:06 EET
netrom-2.4.0-test13-pre3-patch-v1:
= netrom.h:
- netrom_register_sysctl, netrom_unregister_sysctl:
wrapped in conditional that will handle the case when
sysctl is not configured.
= af_netrom.c:
- nr_init, nr_exit:
removed CONFIG_SYSCTL conditionals (making code cleaner?)
= nr_dev.c, nr_in.c, nr_out.c, nr_subr.c, nr_timer.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
= nr_loopback.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- nr_loopback_clear:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
= nr_route.c:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- nr_node_list, nr_neigh_list:
removed explicit initialization as per linux 2.4.
- nr_rt_free:
converted to linux2.4 "__exit" function & removed MODULE
conditional.
af_netrom.c-2.4.0-test13-pre2-patch-v1:
- CONFIG_NETROM, CONFIG_NETROM_MODULE:
removed unnecessary conditionals (the Makefiles handle this)
- nr_list:
removed explicit initialization as per linux 2.4
- nr_proto_init, nr_exit:
removed conditionals for PROC_FS as the PROC_FS headers do
the right thing if PROC_FS is not selected.
- nr_proto_init:
update kernel version number in signon banner
- nr_exit:
marked as exit code as per linux 2.4
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/include/net/netrom.h linux-2.4.0-test13-pre3/include/net/netrom.h
--- linux-2.4.0-test13-pre3.orig/include/net/netrom.h Mon Oct 16 21:42:53 2000
+++ linux-2.4.0-test13-pre3/include/net/netrom.h Mon Dec 18 17:38:56 2000
@@ -173,7 +173,12 @@
extern int nr_t1timer_running(struct sock *);
/* sysctl_net_netrom.c */
+#ifdef CONFIG_SYSCTL
extern void nr_register_sysctl(void);
extern void nr_unregister_sysctl(void);
+#else
+extern inline void nr_register_sysctl(void) {};
+extern inline void nr_unregister_sysctl(void) {};
+#endif /* CONFIG_SYSCTL */
#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/af_netrom.c linux-2.4.0-test13-pre3/net/netrom/af_netrom.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/af_netrom.c Mon Oct 16 21:42:54 2000
+++ linux-2.4.0-test13-pre3/net/netrom/af_netrom.c Mon Dec 18 17:35:34 2000
@@ -34,7 +34,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/types.h>
@@ -82,7 +81,7 @@
static unsigned short circuit = 0x101;
-static struct sock *volatile nr_list = NULL;
+static struct sock *volatile nr_list;
static struct proto_ops nr_proto_ops;
@@ -1280,29 +1279,23 @@
sock_register(&nr_family_ops);
register_netdevice_notifier(&nr_dev_notifier);
- printk(KERN_INFO "G4KLX NET/ROM for Linux. Version 0.7 for AX25.037 Linux 2.1\n");
+ printk(KERN_INFO "G4KLX NET/ROM for Linux. Version 0.7 for AX25.037 Linux 2.4\n");
ax25_protocol_register(AX25_P_NETROM, nr_route_frame);
ax25_linkfail_register(nr_link_failed);
-#ifdef CONFIG_SYSCTL
nr_register_sysctl();
-#endif
-
nr_loopback_init();
-#ifdef CONFIG_PROC_FS
proc_net_create("nr", 0, nr_get_info);
proc_net_create("nr_neigh", 0, nr_neigh_get_info);
proc_net_create("nr_nodes", 0, nr_nodes_get_info);
-#endif
return 0;
}
module_init(nr_proto_init);
-#ifdef MODULE
EXPORT_NO_SYMBOLS;
MODULE_PARM(nr_ndevs, "i");
@@ -1311,15 +1304,13 @@
MODULE_AUTHOR("Jonathan Naylor G4KLX <wklhwq.gnwvt@relay.tunkki.fi>");
MODULE_DESCRIPTION("The amateur radio NET/ROM network and transport layer protocol");
-static void nr_exit(void)
+static void __exit nr_exit(void)
{
int i;
-#ifdef CONFIG_PROC_FS
proc_net_remove("nr");
proc_net_remove("nr_neigh");
proc_net_remove("nr_nodes");
-#endif
nr_loopback_clear();
nr_rt_free();
@@ -1329,9 +1320,7 @@
unregister_netdevice_notifier(&nr_dev_notifier);
-#ifdef CONFIG_SYSCTL
nr_unregister_sysctl();
-#endif
sock_unregister(PF_NETROM);
for (i = 0; i < nr_ndevs; i++) {
@@ -1346,8 +1335,3 @@
kfree(dev_nr);
}
module_exit(nr_exit);
-#endif /* MODULE */
-
-
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_dev.c linux-2.4.0-test13-pre3/net/netrom/nr_dev.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_dev.c Thu Feb 17 19:18:47 2000
+++ linux-2.4.0-test13-pre3/net/netrom/nr_dev.c Mon Dec 18 17:35:34 2000
@@ -19,7 +19,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/proc_fs.h>
@@ -236,5 +235,3 @@
return 0;
};
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_in.c linux-2.4.0-test13-pre3/net/netrom/nr_in.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_in.c Sun Apr 12 02:18:16 1998
+++ linux-2.4.0-test13-pre3/net/netrom/nr_in.c Mon Dec 18 17:35:34 2000
@@ -25,7 +25,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -304,5 +303,3 @@
return queued;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_loopback.c linux-2.4.0-test13-pre3/net/netrom/nr_loopback.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_loopback.c Thu May 4 20:27:14 2000
+++ linux-2.4.0-test13-pre3/net/netrom/nr_loopback.c Mon Dec 18 17:35:34 2000
@@ -16,13 +16,13 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/types.h>
#include <linux/socket.h>
#include <linux/timer.h>
#include <net/ax25.h>
#include <linux/skbuff.h>
#include <net/netrom.h>
+#include <linux/init.h>
static struct sk_buff_head loopback_queue;
static struct timer_list loopback_timer;
@@ -91,9 +91,7 @@
}
}
-#ifdef MODULE
-
-void nr_loopback_clear(void)
+void __exit nr_loopback_clear(void)
{
struct sk_buff *skb;
@@ -102,7 +100,3 @@
while ((skb = skb_dequeue(&loopback_queue)) != NULL)
kfree_skb(skb);
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_out.c linux-2.4.0-test13-pre3/net/netrom/nr_out.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_out.c Tue Feb 10 23:07:49 1998
+++ linux-2.4.0-test13-pre3/net/netrom/nr_out.c Mon Dec 18 17:35:34 2000
@@ -17,7 +17,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -272,5 +271,3 @@
}
}
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_route.c linux-2.4.0-test13-pre3/net/netrom/nr_route.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_route.c Tue Jun 27 03:06:55 2000
+++ linux-2.4.0-test13-pre3/net/netrom/nr_route.c Mon Dec 18 17:35:34 2000
@@ -22,7 +22,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -48,12 +47,13 @@
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/netfilter.h>
+#include <linux/init.h>
#include <net/netrom.h>
static unsigned int nr_neigh_no = 1;
-static struct nr_node *nr_node_list = NULL;
-static struct nr_neigh *nr_neigh_list = NULL;
+static struct nr_node *nr_node_list;
+static struct nr_neigh *nr_neigh_list;
static void nr_remove_neigh(struct nr_neigh *);
@@ -850,12 +850,10 @@
return len;
}
-#ifdef MODULE
-
/*
* Free all memory associated with the nodes and routes lists.
*/
-void nr_rt_free(void)
+void __exit nr_rt_free(void)
{
struct nr_neigh *s, *nr_neigh = nr_neigh_list;
struct nr_node *t, *nr_node = nr_node_list;
@@ -874,7 +872,3 @@
nr_remove_neigh(s);
}
}
-
-#endif
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_subr.c linux-2.4.0-test13-pre3/net/netrom/nr_subr.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_subr.c Sun Apr 12 02:18:16 1998
+++ linux-2.4.0-test13-pre3/net/netrom/nr_subr.c Mon Dec 18 17:35:34 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -297,5 +296,3 @@
sk->dead = 1;
}
-
-#endif
diff -u3Nr -X dontdiff linux-2.4.0-test13-pre3.orig/net/netrom/nr_timer.c linux-2.4.0-test13-pre3/net/netrom/nr_timer.c
--- linux-2.4.0-test13-pre3.orig/net/netrom/nr_timer.c Thu May 4 20:27:39 2000
+++ linux-2.4.0-test13-pre3/net/netrom/nr_timer.c Mon Dec 18 17:35:34 2000
@@ -16,7 +16,6 @@
*/
#include <linux/config.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
@@ -245,5 +244,3 @@
nr_start_t1timer(sk);
}
-
-#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to glasruhw@mailit.tunk.net
This archive was generated by hypermail 2b30 : Mon Dec 18 2000 - 18:13:01 EET