From owner-acpi-jp@jp.FreeBSD.org Thu Jan  1 09:13:13 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i010DDK45224;
	Thu, 1 Jan 2004 09:13:13 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from hermes.home.paeps.cx (postfix@hermes.home.paeps.cx [2001:838:37f:10:20c:6eff:fe4b:23f])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet6 id i010DCC45012
	for <acpi-jp@jp.FreeBSD.org>; Thu, 1 Jan 2004 09:13:12 +0900 (JST)
	(envelope-from philip@hermes.home.paeps.cx)
Received: by hermes.home.paeps.cx (Postfix, from userid 1001)
	id 48B8941; Thu,  1 Jan 2004 01:13:09 +0100 (CET)
From: Philip Paeps <philip+freebsd@paeps.cx>
To: acpi-jp@jp.FreeBSD.org
Message-ID: <20040101001308.GF784@hermes.home.paeps.cx>
Mail-Followup-To: acpi-jp@jp.FreeBSD.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> <20031231145342.P2857@root.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031231145342.P2857@root.org>
X-Date-in-Rome: pridie Kalendas Ianuarias MMDCCLVII ab Urbe Condida
X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879
X-Message-Flag: Get a proper mailclient!  Mutt: <http://www.mutt.org/>
User-Agent: Mutt/1.5.5.1i
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Thu, 1 Jan 2004 01:13:08 +0100
X-Sequence: acpi-jp 2961
Subject: [acpi-jp 2961] Re: [patch] Thermal ioctls?
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: philip+freebsd@paeps.cx
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+031216

On 2003-12-31 14:55:43 (-0800), Nate Lawson <nate@root.org> wrote:
> 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.

A bit of creative googling tells me jhb@ has had some tools using thermal
ioctls since 2001:

  http://people.freebsd.org/~jhb/acpi/
  http://people.freebsd.org/~jhb/acpi/health.c

So it appears they used to exist at some point, but were removed?  Or has John
also been using local patches?

I just find it a bit strange that we have ioctls for some ACPI devices but not
for others.  For the sake of consistency, we should either have them for
everything (well, the things that could use them), or for nothing at all, and
just use sysctl for everything.  That's just my opinion though...

 - Philip

-- 
Philip Paeps                                          Please don't CC me, I am
                                                       subscribed to the list.

  Absolutely nothing in the world is friendlier than
  a wet dog.
