[PATCH] HAL 0.5 - don't add a device if we already have it
David Zeuthen
david at fubar.dk
Mon Mar 14 22:02:43 PST 2005
On Mon, 2005-03-14 at 19:04 +0100, Kay Sievers wrote:
> While playing around with hotplug event replay from initramfs, it happens,
> that events are generated for devices HAL already knows from its coldplug
> run. This leads to a lot of funny double entries in the device store. :)
Interesting :-)
> We should prevent the device addition by hotplug events if we already
> have one with the same sysfs-devpath.
That sounds sensible. At some point we need to make the device store
lookup O(1) (hashing on UDI) instead of O(n) but we probably also want
sysfs_path and other things as an index so operations like these are
also O(1). Hmmm..
I've applied your patch, thanks.
Cheers,
David
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list