I was just wondering why you want to use memcpy_tofs and not copy_(to|from)_user. From my understanding (which is very little :)), that is the proper way to transfer data between user/kernel memory. You can look at the definitions for these functions in: include/asm-i386/uaccess.h (assuming x86 but my guess is that each architecture has some version of uaccess.h) ------------------------------------------------------------ #define copy_to_user(to,from,n) \ (__builtin_constant_p(n) ? \ __constant_copy_to_user((to),(from),(n)) : \ __generic_copy_to_user((to),(from),(n))) If this is incorrect would someone please say why. Good Luck, -Nick * Sharath <sharath_75@yahoo.com> [020410 08:08]: > yes that is true.. even in 2.4.28 but where is > memcpy_tofs(...) first defined.. > > I do not want to include 'other' headers just cause I > have to.. or has anyone writeen a module that copies > from kernel space to user space.. and how to do it.. > > TIA > Sharath > > > --- Christine Ames <clgisotti@yahoo.com> wrote: > > --- Amit Kucheria <amitk@ittc.ku.edu> wrote: > > > On Mon, 8 Apr 2002, Sharath wrote: > > > > > > > Hi... > > > > > > > > just dwelling into writing a device driver and > > yes > > > > have got some of it sorted out.. however I would > > like > > > > to know where the prototype for memcpy_tofs > > recides. > > > > > > > two places in the 2.4.7-10 kernel: > > > > ../drivers/cdrom/aztcd.c > > #define memcpy_tofs copy_to_user > > > > ../fs/hpfs/hpfs_fn.h > > #define memcpy_tofs memcpy > > > > --Christine > > > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Tax Center - online filing with TurboTax > > http://taxes.yahoo.com/ > > -- > > Kernelnewbies: Help each other learn about the Linux > > kernel. > > Archive: > > http://mail.nl.linux.org/kernelnewbies/ > > FAQ: http://kernelnewbies.org/faq/ > > > > > ===== > -Sharath > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ > -- > 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/