KERN_INFO

This commit is contained in:
Imbus 2024-06-12 12:31:30 +02:00
parent eb3dd5a393
commit 7e530bf026

View file

@ -1,4 +1,5 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
/* Meta Info */ /* Meta Info */
@ -11,7 +12,7 @@ MODULE_LICENSE("GPL");
* @brief Called on load * @brief Called on load
*/ */
static int __init demo_mod_init(void) { static int __init demo_mod_init(void) {
printk("Demo module loaded successfully..."); printk(KERN_INFO "Demo module loaded successfully...");
return 0; return 0;
} }
@ -19,7 +20,7 @@ static int __init demo_mod_init(void) {
* @brief Called on unload * @brief Called on unload
*/ */
static void __exit demo_mod_exit(void) { static void __exit demo_mod_exit(void) {
printk("Demo module unloaded successfully..."); printk(KERN_INFO "Demo module unloaded successfully...");
} }
module_init(demo_mod_init); module_init(demo_mod_init);