patch-2.1.8 linux/include/linux/module.h

Next file: linux/include/linux/netdevice.h
Previous file: linux/include/linux/locks.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.7/linux/include/linux/module.h linux/include/linux/module.h
@@ -58,6 +58,10 @@
 /*
  * Note: The string table follows immediately after the symbol table in memory!
  */
+struct _exceptinfo{
+	struct exception_table_entry *start;
+	struct exception_table_entry *stop;
+};
 
 struct module {
 	struct module *next;
@@ -68,11 +72,26 @@
 	void* addr;			/* address of module */
 	int state;
 	void (*cleanup)(void);		/* cleanup routine */
+	struct _exceptinfo exceptinfo;
 };
 
+/*
+	prior to modules-2.1 there were no real way to identify
+	which insmod is talking to us Now a special signature must
+	be written here.
+
+	The new module utilities knows about older kernel and write
+	the init in the signature and the cleanup in the init.
+	This is to make sure newer utilities work with older kernel
+	so it is simple for people to upgrade.
+*/
+#define MODULE_2_1_7_SIG	((void*)0x00000217)
+
 struct mod_routines {
+	void *signature;
 	int (*init)(void);		/* initialization routine */
 	void (*cleanup)(void);		/* cleanup routine */
+	struct _exceptinfo exceptinfo;
 };
 
 /*
@@ -104,6 +123,7 @@
 #define MOD_INC_USE_COUNT	do { } while (0)
 #define MOD_DEC_USE_COUNT	do { } while (0)
 #define MOD_IN_USE		1
+extern struct module *module_list;
 
 #endif
 

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