Re: character device driver reading only last character of buffer

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

 



On Sep 23, 2010, at 6:47 PM, Bond wrote:

> I wrote a small hello world type of character device driver.
> When I type echo -n "abcdef" > /dev/bond
> and do a cat /dev/bond
> then only last "f" of above input abcdef is displayed rest nothing is displayed.
> I asked this question earlier and some people suggested me some modifications 
> I have done and experimented all that but I am unable to catch the error.
> 
> Can some one point out the error?
> Here is the code

Have you ever used malloc() in user space?
Man, I don't want to be rude, but what you need is to code in user space
before putting your hands in kernel space.


--
Carlo 






--
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