From owner-acpi-jp@jp.FreeBSD.org Thu Jan  1 04:57:09 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hBVJv9800390;
	Thu, 1 Jan 2004 04:57:09 +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 hBVJv8C00385
	for <acpi-jp@jp.FreeBSD.org>; Thu, 1 Jan 2004 04:57:08 +0900 (JST)
	(envelope-from philip@hermes.home.paeps.cx)
Received: by hermes.home.paeps.cx (Postfix, from userid 1001)
	id 6921416; Wed, 31 Dec 2003 20:57:02 +0100 (CET)
From: Philip Paeps <philip+freebsd@paeps.cx>
To: acpi-jp@jp.FreeBSD.org
Message-ID: <20031231195702.GF751@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>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031231113238.A2478@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: Wed, 31 Dec 2003 20:57:02 +0100
X-Sequence: acpi-jp 2956
Subject: [acpi-jp 2956] 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 11:37:20 (-0800), Nate Lawson <nate@root.org> wrote:
> 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.

True, I didn't think about that.

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

We could do a /dev/acpi/tz /dev/acpi/cmbat, etc etc, but I rather like the
'one device fits all' situation we have now.  On the other hand, there is also
a /dev/net grouping network devices, and acpi 'devices' are as much a 'family'
as network devices?

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

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

I must have imagined them then along with the prior existence of thermal
ioctls on FreeBSD.  An insatiable hunger for ioctls, brrr.

 - Philip

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

  The secret of success is sincerity.  Once you can fake
  that you've got it made.
