Add hw1
This commit is contained in:
17
hw1/section_d/hello.c
Normal file
17
hw1/section_d/hello.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static int __init hello_init(void) {
|
||||
pr_info(KERN_INFO "Hello, Kernel");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit hello_exit(void) {
|
||||
pr_info(KERN_INFO "Goodbye, Kernel");
|
||||
}
|
||||
|
||||
module_init(hello_init);
|
||||
module_exit(hello_exit);
|
||||
MODULE_AUTHOR("Edith Boles <edith@penguinowl.dev>");
|
||||
MODULE_LICENSE("GPL");
|
||||
Reference in New Issue
Block a user