X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=hello%2Fhello.c;h=cf6bd93155f292c0aa78b06e4dce4eea841ae75d;hb=03c307fe6b73ddf913a16e30c517c25bfa91a2f4;hp=48bcb33093506b829322a39604e8066e431abec4;hpb=395fd5f8ac9b98dac953183fa3d8ccb38c3a86c1;p=my-code%2Fkernel.git diff --git a/hello/hello.c b/hello/hello.c index 48bcb33..cf6bd93 100644 --- a/hello/hello.c +++ b/hello/hello.c @@ -1,14 +1,17 @@ /* my first kernel driver :-) */ -#define MODULE #include +#include +#include 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"); }