[PATCH] fix broken logic for system.formfactor=laptop

Danny Kukawka danny.kukawka at web.de
Tue Aug 14 09:45:11 PDT 2007

On Dienstag, 14. August 2007, Danny Kukawka wrote:
> On Dienstag, 14. August 2007, Danny Kukawka wrote:
> >  * the ACPI input devices as e.g. lid/power/suspend button are not setup
> Sorry, my fault, this is not correct. If there are already the input
> devices the patch add also the ACPI LID etc. devices. I work on a better
> fix.

here now a new patch. Now I would propose to fix the problem for the ACPI case 
by check for a battery bay or a lid button in /proc/acpi/*. I think we can 
may ignore the APM case for the moment.

For this I changed acpi_synthesize() a little bit to let the function run 
without synthesize ACPI devices because this function already check if the 
machine is a laptop.

In computer_probing_helper_done() HAL check now if system.formfactor isn't set 
or not 'laptop' and calls acpi_check_is_laptop() in this case, to do the 
needed checks. If there is a complete and working ACPI implementation in 
sysfs in the future we need to do something similar.


 acpi.c   |   36 ++++++++++++++++++++++++++----------
 acpi.h   |    1 +
 osspec.c |    7 +++++++
 3 files changed, 34 insertions(+), 10 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-computer_probing_v2.diff
Type: text/x-diff
Size: 4202 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070814/ae47db30/attachment-0001.diff 

More information about the hal mailing list