From owner-acpi-jp@jp.FreeBSD.org Thu Jan  1 07:55:48 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hBVMtmr65996;
	Thu, 1 Jan 2004 07:55:48 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from root.org (root.org [67.118.192.226])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with SMTP/inet id hBVMtlC65989
	for <acpi-jp@jp.FreeBSD.org>; Thu, 1 Jan 2004 07:55:47 +0900 (JST)
	(envelope-from nate@root.org)
Received: (qmail 2872 invoked by uid 1000); 31 Dec 2003 22:55:43 -0000
From: Nate Lawson <nate@root.org>
To: Michael Smith <DrZiplok@mac.com>
cc: acpi-jp@jp.FreeBSD.org
In-Reply-To: <9FDA83CC-3BDF-11D8-AE15-000393C72BD6@mac.com>
Message-ID: <20031231145342.P2857@root.org>
References: <20031212114100.GC659@hermes.nixsys.be> <20031212171121.M54374@root.org>
 <20031215073539.GB685@hermes.nixsys.be> <20031231113238.A2478@root.org>
 <20031231195702.GF751@hermes.home.paeps.cx> <9FDA83CC-3BDF-11D8-AE15-000393C72BD6@mac.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 31 Dec 2003 14:55:43 -0800
X-Sequence: acpi-jp 2958
Subject: [acpi-jp 2958] Re: [patch] Thermal ioctls?
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: nate@root.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+031216

On Wed, 31 Dec 2003, Michael Smith wrote:
> On Dec 31, 2003, at 11:57 AM, Philip Paeps wrote:
> >>> [Aside: is there any reason for prefering sysctl over ioctl?  I have
> >>> nothing against either of them, but I notice sysctl getting very
> >>> popular...]
> >>
> >> My approach is: sysctls for user control, ioctls for program control.
> >
> > Sounds logical.
>
> Completely wrong, though.
>
> ioctls are appropriate as a control channel for file descriptors.  If you
> have something that's normally opened and treated like a file, you tend
> to use ioctl against the same file descriptor to control it.
>
> If there's no file descriptor involved, ioctl is not the right
> approach; sysctl
> is the catchall that you should use in that case.  The structured
> namespace
> is superior in most regards anyway.

So are you against adding the thermal ioctls?  It would be nice to
simplify the means of exporting temp data to user applications.  Isn't
there already an API for this that ACPI can provide information to?  I
find it hard to believe FreeBSD has had no thermal information API for the
past 3 years.

-Nate
