Subject: Re: CVS commit: src
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Juan RP <juan@xtrarom.org>
List: source-changes
Date: 10/12/2007 01:54:18
On Fri, 12 Oct 2007 00:49:08 +0900 (JST)
yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:

> avoid unnecessary abstraction?
> i suggested an alternative because the current abstraction
> (eg. calling each power supplies in a server "ac adapter") seems weird
> to me.

What I added is for laptops not for servers.

If we want to make it more generic, IMHO the power resource approach
may be used; this consists in making a distinction between the two classes:
consumers and providers.

A consumer (obviously) uses the power provided by at least one provider.
A provider provides power to the system.

If all consumers need power (for example acpibat[01] is in LOW/CRITICAL
state) and any provider is not providing power (acpiacad OFF), the
'low-power' event should be sent.

This is what my other patch implemented, but freza convinced me to use
this approach for simplicity.

-- 
Juan Romero Pardines	- The NetBSD Project
http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish