Test routine for ACPI and PMU procfs

David Eriksson twogood at users.sourceforge.net
Wed Jan 19 13:22:38 PST 2005


On Wed, 2005-01-19 at 21:01 +0000, Richard Hughes wrote:
> Okay, here's the first version of the hal-external code, that I would
> like some feedback on.
> 
> I've emulated all the hal calls (like hal_device_property_set_string())
> so it's not that hard to do a copy paste into HAL - but I don't think it's
> a particularly good idea at this stage of code!
> 
> Please could you give me some feedback on *HOW* the code works, with any
> ways I could be doing something better, or just plain wrong. Ask if you
> need something explained and I'll add some more comments to the code.
> 
> I know there are loads of objects missing, and the objects have only a
> few attributes set, but this is all PoC code, and I want to get the
> structure right before we all spend too much time on the specifics.
> 
> Code is here:
> 
> http://www.hughsie.com/write/hal-extern.c

Downloading the file at that address was not straightforward. The URL
http://hughsie.no-ip.com/write/hal-extern.c worked much better.

> You can compile it with:
> 
> gcc -Wall -ansi -g hal-extern.c -o hal-extern -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -lglib-2.0 (I'm sure there's a better way to
> compile a single file with glib...)

If you want to shorten the above, remove the -I and -l parameters and
add the following, make sure to use the correct "back-ticks" for
quoting:

`pkg-config --cflags --libs glib-2.0`

And when when I finally compiled it, I realized that I had no Linux
machin with ACPI enabled at the moment... :-/

-- 
Regards,
               -\- David Eriksson -/-

        SynCE - http://synce.sourceforge.net
      ScummVM - http://scummvm.sourceforge.net
     Desquirr - http://desquirr.sourceforge.net

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



More information about the Hal mailing list