projects
/
cascardo
/
kernel
/
samples
/
01.hello
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Linux kernel module hello world!
[cascardo/kernel/samples/01.hello/.git]
/
hello.c
1
#include <linux/module.h>
2
3
MODULE_LICENSE("GPL");
4
5
static int hello_init(void)
6
{
7
printk(KERN_ALERT "Hello, world!\n");
8
return 0;
9
}
10
11
static void hello_exit(void)
12
{
13
printk(KERN_ALERT "Goodbye, cruel world!\n");
14
}
15
16
module_init(hello_init);
17
module_exit(hello_exit);