per-device sysctls

Dag-ErlingSmørgrav des at des.no
Thu Feb 26 10:06:40 PST 2004


The first of the attached patches creates a sysctl context and node
for every device in the system named for its nameunit.  Each device's
sysctl node is a child of the parent device's sysctl node, so the
resulting sysctl tree resembles the "show devices by attachment" mode
of Windows's device manager.  Standard entries in each device's tree
include %class, %desc and %driver (device class, device description
and driver name).  I also plan to add entries for device IDs, irq /
drq lines etc., but this will require additional bus-specific code and
is not yet implemented.

Note that root0 is not created through the usual means and therefore
does not get its own sysctl node; its children (nexus0 on i386) are
placed directly in dev.  I haven't yet decided whether this is a
feature or a bug.

The second patch modifies the NDISulator to use the per-device context
and tree rather than create its own.  There are several other drivers
that do this; I chose the NDISulator because I can actually test it.

DES
-- 
Dag-Erling Smørgrav - des at des.no

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dev.diff
Type: text/x-patch
Size: 5363 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20040226/b6a1addf/dev.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndis.diff
Type: text/x-patch
Size: 3943 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20040226/b6a1addf/ndis.bin


More information about the freebsd-arch mailing list