![]() | |||||||||||||
Messages in this thread |
On 6 Jan 2000, Linus Torvalds wrote: > >And finally, what's up with sysctl? Are driver writers recommended to use > >that over extending /proc or is it deprecated? Again guide lines would be > >nice. > > sysctl is deprecated. It's useful in one way only: it has some nice > functions that can be used to add a block of /proc names. However, it > has other downsides (allocating silly numbers etc - there should be no > need for that, considering that the /proc namespace is alreayd a > perfectly good namespace). Oh, please! All we need is sysctlbyname(2) - _not_ a problem, and closes all problems with numbers. And it should not work through mounted procfs - we can traverse the tree doing comparisons by name just fine. The fact that sysctl(8) needs mounted procfs is an artificial misfeature, nothing more. What _is_ bogus is the idea of sysctl() doing more than read/write access to constant-sized variables. Or procfs entries doing ioctl(), for that matter - just look at /proc/mtrr, for one specimen. sysctl() is a perfectly reasonable subset of pseudofs-type stuff, with well-defined semantics (unlike the rest ;-/). The rest is pretty much a maze of twisted little formats, none alike. IMO dissolving the thing is _not_ a good idea. You have the final word, indeed, but I think that sysctlbyname() may remove most of the problems. - 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/ | ||||||||||||
| Last update: 2005-03-22 13:55 [from the cache] ©2003-2008 | |||||||||||||