]> hackdaworld.org Git - my-code/kernel.git/blobdiff - hello/hello.c
added current struct
[my-code/kernel.git] / hello / hello.c
index 74ace2aaf2f9dd50b45099b518591e0fc33a5b83..cf6bd93155f292c0aa78b06e4dce4eea841ae75d 100644 (file)
@@ -2,9 +2,12 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/sched.h>
 
 int init_module(void) {
        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;
 }