RE: printk and \n

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

 



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-bounce@xxxxxxxxxxxx [kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of sri [bskmohan@xxxxxxxxx]
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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux