Demo module

This commit is contained in:
Imbus 2024-06-12 12:30:17 +02:00
commit eb3dd5a393

26
demo_module.c Normal file
View file

@ -0,0 +1,26 @@
#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);