Created
February 11, 2016 00:06
-
-
Save mavieth/0a25ebd7fecfe8ab8e20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <linux/init.h> | |
| #include <linux/kernel.h> | |
| #include <linux/module.h> | |
| /* This function is called when the module is loaded. */ | |
| int simple init(void){ | |
| printk(KERN INFO "Loading Module\n"); return 0; | |
| } | |
| /* This function is called when the module is removed. */ | |
| void simple exit(void) { | |
| printk(KERN INFO "Removing Module\n"); | |
| } | |
| /* Macros for registering module entry and exit points. */ | |
| module init(simple init); | |
| module exit(simple exit); | |
| MODULE LICENSE("GPL"); | |
| MODULE DESCRIPTION("Simple Module"); MODULE AUTHOR("SGG"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment