1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <linux/module.h> #include <linux/kernel.h> MODULE_LICENSE("GPL"); int harddoom_init(void) { printk(KERN_INFO "Initializing harddoom\n"); return 0; } void harddoom_cleanup(void) { printk(KERN_INFO "Removing harddoom\n"); } module_init(harddoom_init); module_exit(harddoom_cleanup);