diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0e14332 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +obj-m := simplefs.o +simplefs-objs := simple.o + +all: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean diff --git a/simple.c b/simple.c new file mode 100644 index 0000000..ae14a66 --- /dev/null +++ b/simple.c @@ -0,0 +1,26 @@ +/* + * A Simple Filesystem for the Linux Kernel. + * + * Initial author: Sankar P + * License: Creative Commons Zero License - http://creativecommons.org/publicdomain/zero/1.0/ + */ + +#include +#include + +static int simplefs_init(void) +{ + printk(KERN_ALERT "Hello World\n"); + return 0; +} + +static void simplefs_exit(void) +{ + printk(KERN_ALERT "Goodbye World\n"); +} + +module_init(simplefs_init); +module_exit(simplefs_exit); + +MODULE_LICENSE("CC0"); +MODULE_AUTHOR("Sankar P");