On Thursday 01 November 2001 11:32, Rusty Russell wrote:
> I believe that rewriting /proc (and /proc/sys should simply die) is a
> better solution than extending the interface, or avoiding it
> altogether by using a new filesystem.
I am currently working on something like this, too. It's using Patrick
Mochel's driverfs patch
as a base and adds the functionality of the extensions that I did to proc fs
for my device registry patch
You can get an idea of the API in the proc_ov patch: every file in the
filesystem is typed and either a string, integer, unsigned long or an enum.
The intention is that you have a single value per file, like in /proc/sys,
and not more. The API does not even allow you to have more complex files (I
plan to add a blob type though).
Unlike comparable APIs it also supports 'dynamic directories'. So you can,
for example, create a directory for each device without registering a
directory for each device. You only need a single dynamic directory with a
couple of callbacks that specify the number of directories, their names and
their contexts. Contexts are void pointers that are given to the callbacks of
the content files, in this example you would probably use the pointer to the
device's struct device as context.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:14 EST