]> www.hackdaworld.org Git - my-code/kernel.git/blobdiff - hello/hello.c
bla
[my-code/kernel.git] / hello / hello.c
index 48bcb33093506b829322a39604e8066e431abec4..cf6bd93155f292c0aa78b06e4dce4eea841ae75d 100644 (file)
@@ -1,14 +1,17 @@
 /* my first kernel driver :-) */
 
-#define MODULE
 #include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
 
 int init_module(void) {
-       printk("<1>hi hackbard, here is your kernel speaking! :)\n");
+       printk(KERN_ALERT "hi hackbard, here is your kernel speaking! :)\n");
+       printk(KERN_ALERT "some info : %s has process id %i\n",current->comm,
+                                                               current->pid);
        return 0;
 }
 
 void cleanup_module(void) {
-       printk("<1>bye hackbard ...\n");
+       printk(KERN_ALERT "bye hackbard ...\n");
 }