yes,
it flushes buffer on \n

Something like fflush() function can also be used to explicitly flush 
stdout/stderr in user space, not sure if it is in kernel space...
________________________________________
From: kernelnewbies-bou...@nl.linux.org [kernelnewbies-bou...@nl.linux.org] On 
Behalf Of sri [bskmo...@gmail.com]
Sent: Friday, September 24, 2010 11:42 AM
To: Kernel Newbies
Subject: printk and \n

Hi

printk("device opened\n");
printk("device file opened by %d", current->pid);

Here the second printk output is not displayed.
Without \n printk is not flushing out its buffer.  If I give, \n in the second 
printk it is working.

Is there any reason for that?

Sri--

______________________________________________________________________

This Email may contain confidential or privileged information for the intended 
recipient (s) If you are not the intended recipient, please do not use or 
disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to