Last active
October 11, 2015 11:27
-
-
Save Taehun/3851414 to your computer and use it in GitHub Desktop.
Linux Kernel Module Example: Hello kernel
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
static int __init hello_init(void) | |
{ | |
printk(KERN_INFO "Hello kernel.\n"); | |
return 0; | |
} | |
static void __exit hello_exit(void) | |
{ | |
printk(KERN_INFO "Good bye kernel..\n"); | |
} | |
module_init(hello_init); | |
module_exit(hello_exit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment