On Wed, Feb 02, 2005 at 14:21:31 +0530, Shyamjith wrote: > >There is *NO* Copyto_User. There are copy_to_user and copy_from_user. > >>>And anway, these are NOT a method of communication -- they are the > >>low-level mechanizm under some of them. The mechanizms available are: > >>1) Character device > 2>>) ioctl on character device > >>3) procfs file > >>4) Netlink socket > > > See i think we are talking about kernel programming . What i mean to say is > that there is only two ways to communiacte to user space . One through a > registerd read or write functions & other one through proc file system . proc filesystem is also registered read and write functions. The four points above are four things that allow defiing those functions. Yes, proc files have default implementations that read/write to a buffer. But they are just default implementations -- proc file is fully general. > copy_to_user is used when > the user tries to read from the kernel space (usually its implemented > through devices and proc files ). And i am quite sure that we can read or > write to a file from kernel space using the internal file_read() or > XXX_write() functions . > > regards, > shyam > > > > ----- Original Message ----- > From: "Jan Hudec" <bulb@xxxxxx> > To: "shyamjith" <shyamjithe@xxxxxxxxxxxxxxx> > Cc: <kernelnewbies@xxxxxxxxxxxx> > Sent: Wednesday, February 02, 2005 1:20 PM > Subject: Re: How to read file in kernel module? > > > ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature