aboutsummaryrefslogtreecommitdiff
path: root/pa1_syscalls_lkms/modules/hellomodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'pa1_syscalls_lkms/modules/hellomodule.c')
-rw-r--r--pa1_syscalls_lkms/modules/hellomodule.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pa1_syscalls_lkms/modules/hellomodule.c b/pa1_syscalls_lkms/modules/hellomodule.c
new file mode 100644
index 0000000..0d92e22
--- /dev/null
+++ b/pa1_syscalls_lkms/modules/hellomodule.c
@@ -0,0 +1,20 @@
+#include <linux/init.h>
+#include <linux/module.h>
+
+MODULE_AUTHOR("jasa7131");
+MODULE_LICENSE("GPL");
+
+int hello_init(void);
+void hello_exit(void);
+
+int hello_init(void) {
+ printk(KERN_ALERT "inside %s function\n", __FUNCTION__);
+ return 0;
+}
+
+void hello_exit(void) {
+ printk(KERN_ALERT "inside %s function\n", __FUNCTION__);
+}
+
+module_init(hello_init);
+module_exit(hello_exit);