[PATCH] fix APM support and set/fix system.formfactor=laptop

Danny Kukawka danny.kukawka at web.de
Sun Oct 23 15:10:29 PDT 2005


Hi,

this patch fix several things:

* fix detection of battery for APM: prevent to read battery info if there is 
no battery present. There is no battery if 'battery_percentage < 0' (and not 
'<= 0' ) or/and if battery_status flag is 0xff.
* fixed delete battery keys for APM if battery is removed

* Added detection of laptops to APM (if battery present) and ACPI (if battery 
bay or/and LID-Button) and set key system.formfactor=laptop

* fixed set system.formfactor from smbios.chassis.type to prevent overwrite 
otherwise set key (e.g. from APM/ACPI/PMU code).

Please review.

Cheers,

Danny

 ChangeLog            |   17 +++++++++++++++++
 hald/linux2/acpi.c   |   25 +++++++++++++++++++++++++
 hald/linux2/apm.c    |   46 ++++++++++++++++++++++++++++++++++++++++------
 hald/linux2/osspec.c |    4 +++-
 4 files changed, 85 insertions(+), 7 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-is_laptop_and_APM.diff
Type: text/x-diff
Size: 7745 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20051024/e53f0a9d/hal-fix-is_laptop_and_APM.bin


More information about the hal mailing list