commit eb3dd5a39356be1bfbb366a8589072d84cc94856 Author: Imbus <> Date: Wed Jun 12 12:30:17 2024 +0200 Demo module diff --git a/demo_module.c b/demo_module.c new file mode 100644 index 0000000..1e03ee0 --- /dev/null +++ b/demo_module.c @@ -0,0 +1,26 @@ +#include +#include + +/* 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);