On Sat, Sep 25, 2010 at 11:06 PM, Chetan Nanda <[email protected]>wrote:

>
>
>
>
>
> as per my understanding (may be wrong), issue is not with the
> copy_to/from_user. May be with the return values from  bond_read/write
> function.
> Drivers read/write should return the number of bytes read or written.
>
Agreed that was a mistake in my code.

On Sat, Sep 25, 2010 at 7:34 PM, Bond <[email protected]> wrote:

> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f2a2f03b000
>
>> write(1, "abcde", 5)                    = 1
>> write(1, "bcde", 4)                     = 1
>> write(1, "cde", 3)                      = 1
>> write(1, "de", 2)                       = 1
>> write(1, "e", 1)                        = 1
>> close(1)                                = 0
>> munmap(0x7f2a2f03b000, 4096)            = 0
>> close(2)                                = 0
>> exit_group(0)                           = ?
>>
>>
>> Can you say any thing about the strace log above as why did I got the
above output.

Reply via email to