Re: copy_to_user() and copy_from_user(): confusing code

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

 



Hi,

Replying to the list this time.

On Sat, Sep 25, 2010 at 10:22 PM, Bond <jamesbond.2k.g@xxxxxxxxx> wrote:
>>> write(1, "abcde", 5)                    = 1

User mode tried to write 5 characters.
The driver only accepted one (which is evidenced by the return code
which is the number of characters which the driver accepted).

>>> write(1, "bcde", 4)                     = 1

So usermode then tried to write the remaining 4 characters.
The driver only accepted one.

>>> write(1, "cde", 3)                      = 1

etc.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

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