Test routine for ACPI and PMU procfs

Richard Hughes ee21rh at surrey.ac.uk
Thu Jan 20 08:19:40 PST 2005


Sjoerd Simons <sjoerd <at> luon.net> writes:

> * In several places you define new variables after doing some other code, this
>   will break on older gcc's and probably other compilers

Is there any way to test this - i.e. a compiler flag I can use? 

> * Your scan functions appear to be, if name == value then do function(path) a
>   lot.. Can be made more generic :)

Working on this:

/*
 Creates a new ACPI generic device
Typically:
  base_path	"/proc/acpi"
  object_name	"ac_adaptor"
  acpi_tag	"ADP1"
  number	0
*/
...normal HAL object setup...
/* Refresh properties for this device */
acpi_refresh(procfspath, object_name, d);
...normal HAL object finish...

where acpi_refresh populates the specifics for each device (batt level, etc) -
this means the same routines can be used to refresh the devices, as create.
 
> Also i think it would be nice to have some functions to create standard
> objects.. Like hal_device_battery_new

Working on it :-) I'm still playing with the code - version 002 is already very
different from 001, it's much more modular and easy to understand.

I'll post 002 this weekend when I've tested it more.
 
Richard




_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list