PERFORCE change 124787 for review
John Baldwin
jhb at freebsd.org
Mon Aug 27 08:18:43 PDT 2007
On Monday 06 August 2007 08:30:35 pm Constantine A. Murenin wrote:
> http://perforce.freebsd.org/chv.cgi?CH=124787
>
> Change 124787 by cnst at dale on 2007/08/07 00:30:22
>
> sensordev_get(9)/sensor_find(9) are only used for sysctl(3) glue code,
> and on FreeBSD it is all located in kern_sensors.c, so no need to put
> prototypes in <sys/sensors.h>.
Have you thought about using the dynamic sysctl tree stuff in FreeBSD instead
of having hw.sensors proc handler that walks the sensor tree? You could just
give each sensor its own sysctl_ctx and tree. You can then use standard
sysctl routines for handling individual sensor nodes, (or still use custom ones
with SYSCTL_ADD_PROC) etc.
OpenBSD doesn't support adding sysctls at runtime, so they had to use a
complex hw.sensors routine, but you can take advantage of the dynamic sysctl
tree in FreeBSD to reduce complexity.
--
John Baldwin
More information about the p4-projects
mailing list