Inserting it gives the correct output in /var/log/messages/ but when I try to remove it, it KILLS it and makes it unremovable!!! This screws up a whole lot of other things like my start up sometimes as well.
Code:
#include <linux/module.h> /* Needed by all modules */#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h>
static int hello2_data __initdata = 2;
static int __init hello_2_init(void)
{
printk("My Name: Loading Hello%d module - Hello World %d\n",hello2_data,hello2_data);
return 0;
}
static void __exit hello_2_exit(void)
{
printk("My Name: Exiting Hello%d module - Goodbye World %d\n",hello2_data,hello2_data);
}
module_init(hello_2_init);
module_exit(hello_2_exit);
I want it to print the exitting statement when I rmmod hello_2 but that command just KILLS it and I have to restart to remove it and the exitting message doesnt get put into the /var/log/message/