It might make more sense if the word "moronic" was replaced with "counter-intuitive". John ----- Original Message ----- From: "Dan Erickson" <coldoneknight@rogers.com> To: <kernelnewbies@nl.linux.org> Sent: Saturday, April 27, 2002 9:42 AM Subject: copy_to_user() / copy_from_user() (is it really stupid?) > > > Howdy, > > I was reading Rusty's Unreliable Guide To Hacking The Linux Kernel > and Rusty claims that copy_from_user() and copy_to_user() have a > > <snip> > moronic interface due to the fact that they return the amount of uncopied data > (ie. 0 still means success). > </snip> > > now uhh... if they return the amout of uncopied data, and it returns 0, > then that means 0 bytes went uncopied... Which is exactly what we want, > since we dont want a few bytes to go uncopyed. > > Is this a typo? Or am I an idiot? > > Thanks > -Dan Erickson- > -ColdOneKnight@rogers.com- > > P.S Dont answer that last question, :) > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/