[PATCH 7/8] set 'linux.sysfs_path' as an indexed property

Rob Taylor rob.taylor at codethink.co.uk
Thu Mar 6 15:42:48 PST 2008


Greatly speeds up coldplugging, as most of the time is spent in
hal_device_store_match_key_value_string, looking up a device by its 
sysfs path.
---
  hald/linux/osspec.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index 4900acf..2a1726e 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -396,6 +396,9 @@ osspec_init (void)
  	/*
  	 * setup socket for listening from messages from udev
  	 */
+
+	hal_device_store_index_property (hald_get_gdl (), "linux.sysfs_path");
+
  	memset(&saddr, 0x00, sizeof(saddr));
  	saddr.sun_family = AF_LOCAL;
  	/* use abstract namespace for socket path */


More information about the hal mailing list