Re: printf

Andrew E. Mileski (aem@ott.hookup.net)
Sun, 12 Jan 1997 04:15:04 -0500 (EST)


> I write a device driver, in the program I added some printf
> sentence to get the debug information. But it seems that
> it does not work, that is I could not get any info on my
> console.
>
> How should I do?

Use printk(). It works like printf for the most part.

Example: printk( KERN_DEBUG "Hello World!\n" );

Where KERN_DEBUG is one of the priority levels defined in
<linux/kernel.h>

P.S. If you are using sendmail, try changing /etc/sendmail.cf
CMshoukui.pku.edu.cn
DMpku.edu.cn
This will cause all mail from: shoukui.pku.edu.cn
to be appear to be from: pku.edu.cn

--
Andrew E. Mileski   mailto:aem@ott.hookup.net
Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html