aboutsummaryrefslogtreecommitdiff
path: root/1/main.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-04-17 13:45:51 +0200
committerlonkaars <loek@pipeframe.xyz>2024-04-17 13:45:51 +0200
commit9b173b99874556041c3302b338e27e48978ec967 (patch)
tree2a6e2bdfb02db856c063ec0b24c7cafd66a7375b /1/main.c
parent24db58665354b75d51e21c539b7e1dc5e7fe27c5 (diff)
hello world working
Diffstat (limited to '1/main.c')
-rw-r--r--1/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/1/main.c b/1/main.c
new file mode 100644
index 0000000..819ba32
--- /dev/null
+++ b/1/main.c
@@ -0,0 +1,17 @@
+#include <linux/init.h>
+#include <linux/module.h>
+
+MODULE_LICENSE("MIT");
+
+static int hello_init(void) {
+ printk(KERN_ALERT "Hello, world\n");
+ return 0;
+}
+
+static void hello_exit(void) {
+ printk(KERN_ALERT "Goodbye, world\n");
+}
+
+module_init(hello_init);
+module_exit(hello_exit);
+