diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-30 10:07:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-30 10:07:00 -0700 |
commit | a5363843f6fde193b61d6b06779229390eb4071c (patch) | |
tree | f13d6c7ae2d45040ea0bd2b994e9032ea0908ca7 /bad | |
parent | 65d04adea25d2976609c828439dc7af9664ecdf1 (diff) | |
download | patches-a5363843f6fde193b61d6b06779229390eb4071c.tar.gz |
moved some files out of gregkh/ into bad/ as they are no longer needed to be built all the time
Diffstat (limited to 'bad')
-rw-r--r-- | bad/gpl_future-test.patch | 95 | ||||
-rw-r--r-- | bad/gregkh-debugfs_example.patch | 86 |
2 files changed, 181 insertions, 0 deletions
diff --git a/bad/gpl_future-test.patch b/bad/gpl_future-test.patch new file mode 100644 index 0000000000000..cc651e4466b1f --- /dev/null +++ b/bad/gpl_future-test.patch @@ -0,0 +1,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"); ++ ++ diff --git a/bad/gregkh-debugfs_example.patch b/bad/gregkh-debugfs_example.patch new file mode 100644 index 0000000000000..492f50df2a1e5 --- /dev/null +++ b/bad/gregkh-debugfs_example.patch @@ -0,0 +1,86 @@ +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: debugfs example code + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + fs/debugfs/debugfs_example.c | 70 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 70 insertions(+) + +--- /dev/null ++++ gregkh-2.6/fs/debugfs/debugfs_example.c +@@ -0,0 +1,70 @@ ++/* ++ * debugfs_example.c - Tiny example of how to use debugfs ++ * ++ * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> ++ * Copyright (C) 2004 IBM Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License version ++ * 2 as published by the Free Software Foundation. ++ * ++ * debugfs is for people to use instead of /proc or /sys. ++ * See Documentation/fs/debugfs.txt for more details. ++ * ++ */ ++ ++#include <linux/config.h> ++#include <linux/module.h> ++#include <linux/fs.h> ++#include <linux/mount.h> ++#include <linux/pagemap.h> ++#include <linux/init.h> ++#include <linux/namei.h> ++#include <linux/debugfs.h> ++ ++ ++static struct dentry *test_dentry; ++static struct dentry *test_dir; ++static struct dentry *test_u32_dentry; ++static u32 value = 42; ++ ++ ++static ssize_t example_read_file(struct file *file, char __user *user_buf, ++ size_t count, loff_t *ppos) ++{ ++ char buf[10]; ++ ++ sprintf(buf, "foo\n"); ++ return simple_read_from_buffer(user_buf, count, ppos, buf, sizeof(buf)); ++} ++ ++ ++static int example_open(struct inode *inode, struct file *file) ++{ ++ return 0; ++} ++ ++static struct file_operations example_file_operations = { ++ .read = example_read_file, ++ .open = example_open, ++}; ++ ++static int __init test_init(void) ++{ ++ test_dir = debugfs_create_dir("foo_dir", NULL); ++ test_dentry = debugfs_create_file("foo", 0444, test_dir, NULL, &example_file_operations); ++ test_u32_dentry = debugfs_create_u32("foo_u32", 0444, test_dir, &value); ++ return 0; ++} ++ ++static void __exit test_exit(void) ++{ ++ debugfs_remove(test_u32_dentry); ++ debugfs_remove(test_dentry); ++ debugfs_remove(test_dir); ++} ++ ++module_init(test_init); ++module_exit(test_exit); ++MODULE_LICENSE("GPL"); ++ |