cf6bd93155f292c0aa78b06e4dce4eea841ae75d
[my-code/kernel.git] / hello / hello.c
1 /* my first kernel driver :-) */
2
3 #include <linux/module.h>
4 #include <linux/kernel.h>
5 #include <linux/sched.h>
6
7 int init_module(void) {
8         printk(KERN_ALERT "hi hackbard, here is your kernel speaking! :)\n");
9         printk(KERN_ALERT "some info : %s has process id %i\n",current->comm,
10                                                                 current->pid);
11         return 0;
12 }
13
14 void cleanup_module(void) {
15         printk(KERN_ALERT "bye hackbard ...\n");
16 }
17