From 298d43a1b1527bffd687fc13267b7e505077b699 Mon Sep 17 00:00:00 2001 From: lxsameer Date: Wed, 23 Feb 2011 11:18:02 +0330 Subject: [PATCH] kernel template improved --- src/templates/c/kernel_module/__project__.c.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/templates/c/kernel_module/__project__.c.tmpl b/src/templates/c/kernel_module/__project__.c.tmpl index ed77046..edb476f 100644 --- a/src/templates/c/kernel_module/__project__.c.tmpl +++ b/src/templates/c/kernel_module/__project__.c.tmpl @@ -4,18 +4,23 @@ #include #include + MODULE_LICENSE("GPL"); MODULE_AUTHOR("::author:: <::email::>"); MODULE_DESCRIPTION("::desc::"); -static int module_init(void) + +static int __init module_init(void) { printk(KERN_ALERT "Hello, world\n"); return 0; } + static void module_exit(void) { printk(KERN_ALERT "Goodbye, cruel world\n"); } + + module_init(module_init); module_exit(module_exit);