From owner-acpi-jp@jp.FreeBSD.org Thu Jan  1 04:37:26 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hBVJbQ192431;
	Thu, 1 Jan 2004 04:37:26 +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 hBVJbPC92423
	for <acpi-jp@jp.FreeBSD.org>; Thu, 1 Jan 2004 04:37:25 +0900 (JST)
	(envelope-from nate@root.org)
Received: (qmail 2480 invoked by uid 1000); 31 Dec 2003 19:37:20 -0000
From: Nate Lawson <nate@root.org>
To: Philip Paeps <philip+freebsd@paeps.cx>
cc: acpi-jp@jp.FreeBSD.org
In-Reply-To: <20031215073539.GB685@hermes.nixsys.be>
Message-ID: <20031231113238.A2478@root.org>
References: <20031212114100.GC659@hermes.nixsys.be> <20031212171121.M54374@root.org>
 <20031215073539.GB685@hermes.nixsys.be>
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 11:37:20 -0800
X-Sequence: acpi-jp 2955
Subject: [acpi-jp 2955] 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 Mon, 15 Dec 2003, Philip Paeps wrote:
> Sure.  Let me know if I can help on the implementation.  I just needed some
> quick ioctls :-)

One problem is with multiple thermal zones (tz0, tz1, ...).  Your code
doesn't seem to handle this.  It might make sense to add a unit argument
to the ioctls or possibly we need to start exporting /dev/acpi_tz[0-9].
The latter seems like a bad idea though.

> [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.

> > Do you have a pointer to the ioctls Linux apps expect?  It would be nice to
> > have source compatibility where possible.
>
> I'll have a look around.  Many tools are also using /proc on Linux, which is
> possibly my least favourite interface into the kernel *sigh*.  Then there's
> also those that cheat via apm...
>
> Source-compatibility with Linux is a bit like turning lead into gold at times,
> or vice-versa *evil grin*
>
> Time to grep source-trees.

After thinking about it some more, I doubt there are any Linux ioctls.

-Nate
