Skip to contentSkip to conversation

proc fs extension for "one-value-per-file"

RFC Tim Jansen 1 participant 1 message May 14, 2001

lore
Share & tools
lore

Tim Jansen

author
#0 lore raw

The following patch extends the proc fs api as discussed in the thread "/proc format" last month (http://marc.theaimsgroup.com/?t=98822545000007&w=2&r=1).

It adds the following features:
- dynamic directories. Enables you to use directories for enumerations, similar to the per-process directories (/proc/<number>) or usbdevfs.
- context callbacks for directories. They can do things that are common for all files in a directory, like locking, and are also used for dynamic directories.
- special functions with context support for proc files that containing short strings, integers or enums

These things give the proc filesystem the functionality that I need for the Device Registry patch to replace the XML output with the one-value-per-file approach. The api is documented in fs/proc/onevalue.c.

You can download the patch for 2.4.4 here (40 kB):
http://www.tjansen.de/devreg/proc_ov-2.4.4.diff

bye...