]> rtime.felk.cvut.cz Git - mf6xx.git/blob - doc/diploma_thesis/kernel_module_example/hello.c
Sample 'Hello world' kernel module (used in diploma thesis text).
[mf6xx.git] / doc / diploma_thesis / kernel_module_example / hello.c
1 #include <linux/init.h>
2 #include <linux/module.h>
3
4 static int hello_init(void)
5 {
6         printk("Hello, world!\n");
7         return 0;
8 }
9
10 static void hello_exit(void)
11 {
12         printk("Goodbye, cruel world!\n");
13 }
14
15 module_init(hello_init);
16 module_exit(hello_exit);
17  
18 MODULE_LICENSE("Dual BSD/GPL");