Created
April 13, 2015 06:25
-
-
Save itrobotics/0fc2b2af314e112e55cc to your computer and use it in GitHub Desktop.
hello world of the linux module
This file contains 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/init.h> | |
MODULE_LICENSE("Dual BSD/GPL"); | |
static int hello_init(void) | |
{ | |
printk("Hello world!\n"); | |
return 0; | |
} | |
static void hello_exit(void) | |
{ | |
printk("Goodbye, hello world\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