initial
This commit is contained in:
21
driver/hello.c
Normal file
21
driver/hello.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
static int __init hello_init(void) {
|
||||
pr_info("hello: Modul wurde geladen.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit hello_exit(void) {
|
||||
pr_info("hello: Modul wurde entladen.\n");
|
||||
}
|
||||
|
||||
module_init(hello_init);
|
||||
module_exit(hello_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Du");
|
||||
MODULE_DESCRIPTION("Minimales Kernelmodul-Beispiel");
|
||||
MODULE_VERSION("0.1");
|
||||
|
Reference in New Issue
Block a user