Linus Torvalds wrote:
>
> In short, sysctl NEEDS:
> - "naming": you cannot name the sysctl space with a number: it is much
> too dynamic for that. How do you enumerate drivers? Give them random
> numbers?
> - "listing": showing which sysctl's are there, in a hierarchical manner.
> Again, a listing is useless with a number.
> - "hierarchy". You have different devices, but they have the same
> controls. Do they get the same name? Yes. But in different places in
> the hierarchy.
Yes. For lm_sensors, 'directories' within /proc/sys/dev/sensors are
created automatically whenever a new sensors device is found. The
only way right now to find the sysctl numbers of these directories
is to read another file (/proc/sys/dev/sensors/devices), which lists
them. It works well, but it is not very beautiful.
I suspect there will be more drivers in the future which will have
these problems. Some way of getting a list of the sysctl 'files'
present within a sysctl 'directory' is essential.
(for those wondering: lm_sensors is a collection of drivers for
mainboard SMBus adapters and hardware sensors devices. You can
find more information at http://www.lm-sensors.nu/. Due to
the current kernel feature freeze, we will not submit it until
the 2.5 tree has started. Meanwhile, they work great for 2.2 or
2.3 kernels).
Frodo
-- Frodo Looijaard <frodol@dds.nl> PGP key and more: http://huizen.dds.nl/~frodol Defenestration n. (formal or joc.): The act of removing Windows from your computer in disgust, usually followed by the installation of Linux or some other Unix-like operating system.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:11 EST