Subject: freebsd sysctl compatibility
To: None <tech-kern@netbsd.org>
From: john heasley <heas@shrubbery.net>
List: tech-kern
Date: 02/02/2005 22:48:11
Brian Buhrow's hunch about sysctl variables being the cause of 3ware's
FreeBSD cli not working on NetBSD is spot on. It uses sysctlbyname()
to look-up the following:
kern.osreldate
hw.twe0.driver_version
...
The reason it does not work is that FreeBSD has undocumented OIDs in
their mib, 0.x. eg: mib 0.3 converts a mib name to an oid value. This
is used by sysctlbyname in the same manner that NetBSD's uses
sysctlgetmibinfo.
How should this be dealt with? handle oid 0.x in sys___sysctl? a shim
before sys___sysctl?
Is the latter possible? So that the existing oid resolver code in libc
can be used, and not moved to the kernel.