aboutsummaryrefslogtreecommitdiffstats
path: root/bad/gpl_future-test.patch
blob: cc651e4466b1fc7b123d30f0d84ee5a543ff2d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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");
+
+