I\'m coding a simple kernel module, in Ubuntu 17.04, that takes a string and prints it in the kernel log.
#include #include
Sometimes printk may defer output (that is, message is stored in the internal buffer, but not in kernel log). To avoid such behavior, always add newline (\n) at the end of the string printed:
printk
\n
printk(KERN_ALERT "%s\n" ,mystring);