aboutsummaryrefslogtreecommitdiff
path: root/1
diff options
context:
space:
mode:
Diffstat (limited to '1')
-rw-r--r--1/Makefile6
-rw-r--r--1/main.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/1/Makefile b/1/Makefile
index 990d695..a3e297b 100644
--- a/1/Makefile
+++ b/1/Makefile
@@ -1,8 +1,12 @@
RELEASE := $(shell uname -r)
KERNEL := /lib/modules/$(RELEASE)/build
-obj-m += main.o
+obj-m += lork.o
+lork-y := main.o
all:
$(MAKE) -C $(KERNEL) M=$(PWD) modules
+compile_commands.json:
+ compiledb make -Bn
+
diff --git a/1/main.c b/1/main.c
index 819ba32..7299f36 100644
--- a/1/main.c
+++ b/1/main.c
@@ -3,15 +3,15 @@
MODULE_LICENSE("MIT");
-static int hello_init(void) {
+static int mod_init(void) {
printk(KERN_ALERT "Hello, world\n");
return 0;
}
-static void hello_exit(void) {
+static void mod_exit(void) {
printk(KERN_ALERT "Goodbye, world\n");
}
-module_init(hello_init);
-module_exit(hello_exit);
+module_init(mod_init);
+module_exit(mod_exit);