From 2e422b03a5f321e490fc8592ef7abc7d1d48eaad Mon Sep 17 00:00:00 2001 From: jerome Date: Sat, 19 Jul 2025 22:26:16 +0200 Subject: commit inital --- hello.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hello.c (limited to 'hello.c') diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..f5f4ecc --- /dev/null +++ b/hello.c @@ -0,0 +1,21 @@ +#include +#include +#include + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Sachith Muhandiram"); +MODULE_DESCRIPTION("Simple first Linux module"); +MODULE_VERSION("1.0.0"); + + +static int __init initHelloWorld(void){ + printk(KERN_INFO "Hello, this is my first kernel module \n"); + return 0; +} + +static void __exit exitHelloWorld(void){ + printk(KERN_INFO "Exit Hello world module\n"); +} + +module_init(initHelloWorld); +module_exit(exitHelloWorld); -- cgit v1.2.3