[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kernelnewbies
Subject:    Re: writes on proc file system
From:       Erik Mouw <J.A.K.Mouw () ITS ! TUDelft ! NL>
Date:       2001-08-29 18:57:25
[Download RAW message or body]

On Wed, Aug 29, 2001 at 11:10:02PM +0530, Raghav P wrote:
> Can writes be done to a file in the /proc file system? Is there any driver
> making use of such a write?

Quite some drivers use it, the IDE driver, for example, or the SCSI
layer.

> The proc file system data structure has 2 functions: read_proc() and
> write_proc(); so I guess theoratically it is possible. But all proc
> documents talk about how reads are implemented. Are there good pointers?

Of course: Run "make psdocs" in your kernel tree and you'll get my
procfs guide in Documentation/DocBook/ . If you don't have the
necessary tools, you can also get it from
http://www.kernelnewbies.org/documents/ . It also comes with an example
in Documentation/DocBook/procfs_example.c .


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic