-
[my-code/kernel.git] / hello / hello-1.c
1 /* hello world using init macros */
2
3 #include <linux/module.h>
4 #include <linux/kernel.h>
5 #include <linux/init.h>
6 #include "../general.h"
7
8 int my_init(void)
9 {
10  printk(KERN_ALERT "module loaded\n");
11  printk("KERN_ALERT "
12  return 0;
13 }
14
15 void my_cleanup(void)
16 {
17  printk(KERN_ALERT "module unloaded\n");
18 }
19
20 module_init(my_init);
21 module_exit(my_cleanup);
22
23 MODULE_AUTHOR(ME_THE_AUTHOR);
24 MODULE_DESCRIPTION("bullshit ;)");
25 MODULE_LICENSE("GPL");
26