27 lines
510 B
C
27 lines
510 B
C
|
#include <linux/module.h>
|
||
|
#include <linux/init.h>
|
||
|
|
||
|
/* Meta Info */
|
||
|
MODULE_DESCRIPTION("Demo kernel module.");
|
||
|
MODULE_VERSION("0.0.1");
|
||
|
MODULE_AUTHOR("Imbus");
|
||
|
MODULE_LICENSE("GPL");
|
||
|
|
||
|
/**
|
||
|
* @brief Called on load
|
||
|
*/
|
||
|
static int __init demo_mod_init(void) {
|
||
|
printk("Demo module loaded successfully...");
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @brief Called on unload
|
||
|
*/
|
||
|
static void __exit demo_mod_exit(void) {
|
||
|
printk("Demo module unloaded successfully...");
|
||
|
}
|
||
|
|
||
|
module_init(demo_mod_init);
|
||
|
module_exit(demo_mod_exit);
|