mehmet6parmak
mehmet6parmak

Reputation: 4857

How to Print to Console (Terminal) inside a system call

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

Or is there any not very diffucult way of debugging kernel code?

thanks

Upvotes: 3

Views: 1839

Answers (2)

atcuno
atcuno

Reputation: 543

You should also check the different modifiers to printk (such as KERNEL_DEBUG) which will control where/how the messages are printed, including whether they are printed to all active terminals or just the system buffer

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799520

The accepted way of printing inside the kernel is via printk().

Upvotes: 3

Related Questions