#include #include #include static char *randomstr = "no string specified"; module_param(mystring, charp, 0000); MODULE_PARM_DESC(randomstr, "just some text"); static int __init func_init(void) { printk(KERN_CRIT "testing testing 1..2..3..\n=============\n"); // kern_info only prints to log files printk(KERN_CRIT "if you specified an argument, randomstr is: %s\n", randomstr); return 0; } static void __exit func_exit(void) { printk(KERN_CRIT "Exiting...\n"); } module_init(func_init); module_exit(func_exit); /* Make file contents: obj-m = part3.o KVERSION = $(shell uname -r) all: make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules clean: make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean */