I've searched the net but still haven't found the answer. I followed the direction on http://ubuntuforums.org/showthread.php?t=800251. It compiles ok and I can do insmod. The message is displayed ok. But when I run rmmod, it fails with "Device or resource busy" message. I changed the name of the module and insmod, rmmod, the same happens. I don't know how to forcefully rmmod the module and I also want to know what's causing this 'resource busy' pheonomenon. Any idea? I'm using ubuntu and was told the system was installed from the binary image not compiled so my guess is there's some discrepancy in the system.. Is there any problem in the program below? Thanks in advance. Chan
#include <linux/module.h>
static int __init hello_world( void )
{
printk( "hello world!\n" );
return 0;
}
static void __exit goodbye_world( void )
{
printk( "goodbye world!\n" );
}
module_init( hello_world );
module_exit( goodbye_world );