Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * hello-1.c - The simplest kernel module. | |
3 | */ | |
4 | #define MODULE | |
5 | #include <linux/module.h> /* Needed by all modules */ | |
6 | #include <linux/kernel.h> /* Needed for KERN_INFO */ | |
7 | ||
8 | ||
9 | int init_module(void) | |
10 | { | |
11 | printk("<0>Hello world 1.\n"); | |
12 | /* | |
13 | * A non 0 return means init_module failed; module can't be loaded. | |
14 | */ | |
15 | return 0; | |
16 | } | |
17 | ||
18 | void cleanup_module(void) | |
19 | { | |
20 | printk("<0>Goodbye world 1.\n"); | |
21 | } | |
22 | ||
23 | ||
24 | ||
25 |