| From foo@baz Tue Apr 9 12:12:43 2002 |
| Date: Tue, 09 Apr 2002 12:14:34 -0700 |
| To: Greg KH <greg@kroah.com> |
| From: Greg Kroah-Hartman <gregkh@suse.de> |
| Subject: EXPORT_SYMBOL_GPL_FUTURE test modules |
| |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| --- |
| drivers/gregkh/Makefile | 1 + |
| drivers/gregkh/gpl_test1.c | 41 +++++++++++++++++++++++++++++++++++++++++ |
| drivers/gregkh/gpl_test2.c | 29 +++++++++++++++++++++++++++++ |
| 3 files changed, 71 insertions(+) |
| |
| --- gregkh-2.6.orig/drivers/gregkh/Makefile |
| +++ gregkh-2.6/drivers/gregkh/Makefile |
| @@ -1 +1,2 @@ |
| obj-m += gregkh.o |
| +obj-m += gpl_test1.o gpl_test2.o |
| --- /dev/null |
| +++ gregkh-2.6/drivers/gregkh/gpl_test1.c |
| @@ -0,0 +1,41 @@ |
| +#include <linux/init.h> |
| +#include <linux/module.h> |
| + |
| + |
| +void gregkh_test_function(void) |
| +{ |
| + printk(KERN_INFO "This is the %s function\n", __FUNCTION__); |
| +} |
| +EXPORT_SYMBOL(gregkh_test_function); |
| + |
| +void gregkh_gpl_test_function(void) |
| +{ |
| + printk(KERN_INFO "This is the %s function\n", __FUNCTION__); |
| +} |
| +EXPORT_SYMBOL_GPL(gregkh_gpl_test_function); |
| + |
| +void gregkh_gpl_test_future_function(void) |
| +{ |
| + printk(KERN_INFO "This is the %s function\n", __FUNCTION__); |
| +} |
| +EXPORT_SYMBOL_GPL_FUTURE(gregkh_gpl_test_future_function); |
| + |
| + |
| +static int __init start(void) |
| +{ |
| + printk(KERN_INFO "gpl_test1 loaded\n"); |
| + return 0; |
| +} |
| + |
| +static void __exit end(void) |
| +{ |
| + printk(KERN_INFO "gpl_test1 unloaded\n"); |
| +} |
| + |
| +module_init(start); |
| +module_exit(end); |
| + |
| +MODULE_LICENSE("GPL"); |
| +MODULE_DESCRIPTION("gpl test 1 module"); |
| + |
| + |
| --- /dev/null |
| +++ gregkh-2.6/drivers/gregkh/gpl_test2.c |
| @@ -0,0 +1,29 @@ |
| +#include <linux/init.h> |
| +#include <linux/module.h> |
| + |
| + |
| +extern void gregkh_test_function(void); |
| +extern void gregkh_gpl_test_function(void); |
| +extern void gregkh_gpl_test_future_function(void); |
| + |
| +static int __init start(void) |
| +{ |
| + gregkh_test_function(); |
| +// gregkh_gpl_test_function(); |
| + gregkh_gpl_test_future_function(); |
| + printk(KERN_INFO "gpl_test2 loaded\n"); |
| + return 0; |
| +} |
| + |
| +static void __exit end(void) |
| +{ |
| + printk(KERN_INFO "gpl_test2 unloaded\n"); |
| +} |
| + |
| +module_init(start); |
| +module_exit(end); |
| + |
| +MODULE_LICENSE("Greg's special sauce license"); |
| +MODULE_DESCRIPTION("gpl test 2 module"); |
| + |
| + |