[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printk in a driver




I think u are doing this with X on. X and printk doesn't mix .. Oh! well
most of the time. Try to see whats going on in the console. If X is on I
heard, in printk KERN_EMERG or some such macro is to be supplied, I have
never tried that.

Sourav 
--------------------------------------------------------------------------------
SOURAV SEN    MSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav 
ROOM NO : N-78      TEL :(080)309-2454(HOSTEL)          (080)309-2906 (COMP LAB) 
--------------------------------------------------------------------------------

On Thu, 4 Jan 2001, Guennadi Liakhovetski wrote:

> Hello
> 
> I am trying to see what's going on inside the ioctl() called by hdparm -d1
> /dev/hda. It seems to me that the routine that should be called on this is
> set_using_dma() in ide.c. So I edited it and inserted a couple of
> printk() calls, one in the very beginning. But nothing is printed. So, I
> can see 2 possibilities: 1) the routine is never entered; 2) printk
> doesn't work because I missed something.
> QUESTION: Is just inserting a printk() call anywhere in the kernel
> (provided there is a #include linux/kernel.h) sufficient? Or are there any
> macros (like DEBUG or similar) involved? If it is sufficient and the
> routine is never entered - why? (put it softer - what can be the
> reason?) Any partial replies also welcome.
> 
> Thanks
> Guennadi
> ___
> 
> Dr. Guennadi V. Liakhovetski
> Department of Applied Mathematics
> University of Sheffield, U.K.
> email: G.Liakhovetski@sheffield.ac.uk
> 
> 
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/
> IRC Channel:   irc.openprojects.net / #kernelnewbies
> Web Page:      http://www.surriel.com/kernelnewbies.shtml
> 

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.surriel.com/kernelnewbies.shtml