28 lines
565 B
C
28 lines
565 B
C
/**
|
|
* @file hello.c
|
|
* @author Paul Lödige (ploedige@g.ecc.u-tokyo.ac.jp)
|
|
* @brief prints "Hello World" from the Kernel
|
|
* @version 0.1
|
|
* @date 2022-10-17
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/kernel.h>
|
|
|
|
static int __init hello_init(void) {
|
|
printk("Hello World!");
|
|
return 0;
|
|
}
|
|
|
|
static void __exit hello_exit(void){
|
|
printk("Goodbye!");
|
|
}
|
|
|
|
module_init(hello_init);
|
|
module_exit(hello_exit);
|
|
MODULE_LICENSE("GPL");
|
|
MODULE_DESCRIPTION("Hello World Module");
|
|
MODULE_AUTHOR("ploedige"); |