[PATCH][RFC] guarantee that udi get generated before process FDI

Danny Kukawka danny.kukawka at web.de
Wed Dec 20 07:25:45 PST 2006


Hi,

this patch is a result of discussions at IRC with Sergey Lapin and David. 

The problem is: in the most cases the udi of a device get generated fist after 
the policy and information FDI files get processed. Because of this you can't 
use FDI rules to match a special device udi (the udi of the device is 
something like '/org/freedesktop/Hal/devices/temp/100' until a correct udi 
get generated) e.g. to spawn a child device because the rule get never 
proccessed again for this device.

To fix this I moved the generation of the udi before the calls to process the 
policy and information fdi-files. The mean also to move some 
hal_util_callout_device_add() calls (to process the FDI files after the 
call).

I changed this for all backends, but could test this only for Linux. I'm not 
complete shure if this new workflow maybe cause some adverse effects, but the 
output of lshal look the same as before on some of my test machines.

Please check the patch and comment.

Danny

 freebsd/hf-util.c         |    8 ++++----
 hald_dbus.c               |    4 ++--
 linux/acpi.c              |    9 ++++-----
 linux/apm.c               |   12 ++++++------
 linux/device.c            |    8 ++++----
 linux/pmu.c               |   12 ++++++------
 solaris/devinfo.c         |    6 +++---
 solaris/devinfo_storage.c |    6 +++---
 8 files changed, 32 insertions(+), 33 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-generate_udi_before_processFDI.diff
Type: text/x-diff
Size: 6491 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20061220/8ef9704e/hal-fix-generate_udi_before_processFDI.bin


More information about the hal mailing list