Danny Kukawka danny.kukawka at web.de
Wed Oct 26 08:32:32 PDT 2005

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

I think we don't need one more key, if there is already one.



More information about the hal mailing list