How to print on a console (terminal) inside a system call

how can i print something (for debugging purpose) for the console inside linux system call?

Or is there some kind of not-so-convenient way to debug kernel code?

thank

+3
source share
2 answers

The accepted method of printing inside the kernel is through printk().

+3
source

You should also check various modifiers on printk (for example, KERNEL_DEBUG), which will control where / how messages are printed, including whether they are printed on all active terminals or only in the system buffer

0
source

Source: https://habr.com/ru/post/1772821/


All Articles