hughsient at gmail.com
Wed Oct 26 08:38:49 PDT 2005
On Wed, 2005-10-26 at 17:32 +0200, Danny Kukawka wrote:
> On Wednesday 26 October 2005 17:18, Richard Hughes wrote:
> > How about a key /devices/computer:onBatteryPower which could be
> > set/cleared by each of the acpi, apm, pmu modules?
> > A system service (e.g. updatedb) would then find the value of this key
> > before starting it's progress.
> > And g-p-m could be made a *whole lot* simpler and not have to cache the
> > batteries and ac_adaptors in a complicated caching structure.
> > We would need to add a small lump of code to each addon to change this
> > key.
> > Good idea/bad idea?
> > One key,
> We have already a key for this: ac_adapter.present.
Could we just copy this key to a computer node so we don't have to find
all devices with capability "ac_adapter"?
We want to make the "glue" bit that queries hal as simple as possibly,
hopefully just reading one key.
> This should work with
> laptop and workstation for ACPI/APM and PMU.
> At least you could also check
> battery.rechargeable.is_discharging to detect if run on battery.
What about multiple batteries? We would have to check each one.
> I think we don't need one more key, if there is already one.
See above, but I do see your point.
More information about the hal