On Sat, Sep 25, 2010 at 11:06 PM, Chetan Nanda <chetannanda@xxxxxxxxx> 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 <jamesbond.2k.g@xxxxxxxxx> wrote:
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2a2f03b000write(1, "abcde", 5) = 1write(1, "bcde", 4) = 1write(1, "cde", 3) = 1write(1, "de", 2) = 1write(1, "e", 1) = 1close(1) = 0munmap(0x7f2a2f03b000, 4096) = 0close(2) = 0exit_group(0) = ?
Can you say any thing about the strace log above as why did I got the above output.