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(KERN_ALERT "%s\n" ,mystring);
More Related Contents:
- What are vdso and vsyscall?
- How can I get a filename from a file descriptor inside a kernel module?
- How to use lockdep feature in linux kernel for deadlock detection
- Read/write files within a Linux kernel module
- How to know linux scheduler time slice?
- Measure time in Linux – time vs clock vs getrusage vs clock_gettime vs gettimeofday vs timespec_get?
- What is “:-!!” in C code?
- Whole one core dedicated to single process
- Building a kernel module from several source files which one of them has the same name as the module
- Why am I able to perform floating point operations inside a Linux kernel module?
- How to access mmaped /dev/mem without crashing the Linux kernel?
- Is there a macro definition to check the Linux kernel version?
- What are the implications of the linux __user macro?
- What is the difference between a Linux platform driver and normal device driver?
- What does a dot before the variable name in struct mean?
- How to flush the CPU cache for a region of address space in Linux?
- Checking if errno != EINTR: what does it mean?
- mmap, msync and linux process termination
- How to create a new Linux kernel scheduler
- addr2line on kernel module
- /proc/[pid]/pagemaps and /proc/[pid]/maps | linux
- How to print exact value of the program counter in C
- Efficient way to find task_struct by pid
- Where can I find system call source code?
- Unexpected output when printing directly to text video memory
- Set ALSA master volume from C code
- What is the Windows equivalent to the capabilities defined in sys/select.h and termios.h
- The difference between stdout and STDOUT_FILENO
- Finding out if a message over tcp was delivered
- calling assembly function from c