Re: basic question related to /proc.

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

 



On Mon, 2004-03-29 at 13:42, amith wrote:

>                is writing to a proc file (echo "hi there" > /proc/myfile 
> )  all about allocating memory and storing it there in               
>  some variable inside the module ?  
>               and reading from it writing to the user passed buffer  
> using copy_to_user like functions ?

Sort of.

Think of it more like device nodes and their read and write methods. 
Procfs associates a read and (optionally) a write function with each
node.  Reading and writing to the nodes invoke that function.

Plenty of examples are in fs/proc, such as array.c and misc.c.

	Robert Love



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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