Last active
December 17, 2019 01:58
-
-
Save cvam0000/b47dc5ff5b78ea3141e8758138bd83b8 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
/* An Example of Loadable Kernel Module */ | |
#include<linux/kernel.h> | |
#include<linux/init.h> | |
#include<linux/module.h> | |
MODULE_DESCRIPTION("cvam example kernel module "); | |
MODULE_AUTHOR("cvam"); | |
MODULE_LICENSE("GPL"); | |
static int cvam_module_init(void) | |
{ | |
printk(KERN_ALERT " This function initialised the module "); | |
return 0; | |
} | |
static void cvam_module_exit(void) | |
{ | |
printk(KERN_ALERT " Time to leave the planet kernel " ); | |
} | |
module_init(cvam_module_init); | |
module_exit(cvam_module_exit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment