Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2007 10:47:16 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        "Constantine A. Murenin" <cnst@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 124787 for review
Message-ID:  <200708271047.16689.jhb@freebsd.org>
In-Reply-To: <200708070030.l770UZ4f074257@repoman.freebsd.org>
References:  <200708070030.l770UZ4f074257@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708271047.16689.jhb>