what's wrong with this code? It will not print out current->pid
#define MODULE #include <linux/kernel.h> #include <linux/sched.h> #include <linux/module.h> extern struct task_struct *current; int init_module() {printk("<0>Process command %s pid %i",current->comm, current->pid); return 0;} void cleanup_module() {printk("<0>Goodbye\n"); } |