Can I use printf in kernel module?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
In the book, we have been suggested that use printk.

but I have seen some kernel module that use printf.
When can use use printf? and when is not?

thanks.

Re: Can I use printf in kernel module?

Quoted text here. Click to load it

Good advice.


Which one?

Quoted text here. Click to load it

When you're running in user-space (not in the kernel).

Quoted text here. Click to load it

When in the kernel.

--
Grant Edwards                   grante             Yow!  Am I in GRADUATE
                                  at               SCHOOL yet?
We've slightly trimmed the long signature. Click to see the full one.
Re: Can I use printf in kernel module?
Quoted text here. Click to load it

Thanks for your help.

sorry, I got the point. In my case, it have a
#define printf printk

^_^

Site Timeline