Porting OpenBSD's sysctl hw.sensors framework to FreeBSD

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Jul 10 22:38:00 UTC 2007


In message <469406E0.3090206 at FreeBSD.org>, "Constantine A. Murenin" writes:
>On 10/07/2007 17:43, Poul-Henning Kamp wrote:
>
>> A number of observations:
>> 
>> The main problem about hardware monitoring is the lack of a name-space.
>> 
>> The OpenBSD sysctl doesn't get anywhere close to providing that.
>
>There is no lack in namespace, specifically after the recent redesign of 
>the framework.
>
>When you do sysctl(3) calls in OpenBSD 4.1 [...]

>How do you see this as a lack of a namespace?

What OpenBSD has is an enumeration, and that is not the same as a
name-space.

If you live in the USA, chances are that you have a social security
number.  That is an example of an enumeration: "We have all these
FOOs and we need to tell them apart".

However, you parents gave you a name, because what that is the key
to the human name-space, which is so called for the obvious reason.

Physical measurements are only relevant in the context of their
physical location and the OpenBSD enumeration doesn't even encode
this, it is only interested in the logical location of the sensor,
what kind of bus it is on, what kind of address it has.

For any hw-sensor namespace to make sense, it must, as a minimum,
identify the sensors in terms of the device(-drivers) associated
with the hardware where the sensor senses, not the device-driver
of the sensor itself.

The OpenBSD stuff is a 1980 style hack, and should not be propagated.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list