Re: char driver module prob.

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

 



On Tue, 2005-03-29 at 14:10 +0200, Erik Mouw wrote:
> On Tue, Mar 29, 2005 at 05:09:39PM +0530, Mandeep Sandhu wrote:
> > On Tue, 2005-03-29 at 13:07 +0200, Erik Mouw wrote:
> > > No, userland doesn't expect it, and it will confuse your terminal.
> > > printf() used in userland programs also doesn't print a \0 after every
> > > line, and with reason: \0 is *only* the string terminator used
> > > internally in C, *not* a way to signal end-of-file to userland.
> > > 
> > ok folks! i tried strlen too......but to no avail! :(
> > still only putting `\n' does the trick! what say Erik?
> 
> Without \n, your shell probably overwrites whatever is printed by cat
> with the shell prompt. However, strace shows that cat indeed prints the
> string, so nothing is wrong with either your device or the cat program.
> Try 'cat /dev/mydevice | more' to see it is printed indeed.
> 
yup! more does show "hello" getting printed!

thanks all.
-mandeep
> 
> Erik
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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