diff -Nur -x '*.orig' -x '*~' ubuntu/hald/linux/device.c ubuntu.new/hald/linux/device.c --- ubuntu/hald/linux/device.c 2007-10-09 19:46:59.000000000 +0200 +++ ubuntu.new/hald/linux/device.c 2007-10-23 11:33:30.000000000 +0200 @@ -2345,6 +2345,43 @@ /*--------------------------------------------------------------------------------------------------------------*/ static HalDevice * +ssb_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path) +{ + HalDevice *d; + + d = hal_device_new (); + hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path); + hal_device_property_set_string (d, "linux.sysfs_path_device", sysfs_path); + hal_device_property_set_string (d, "info.bus", "ssb"); + if (parent_dev != NULL) { + hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev)); + } else { + hal_device_property_set_string (d, "info.parent", "/org/freedesktop/Hal/devices/computer"); + } + + hal_util_set_driver (d, "info.linux.driver", sysfs_path); + + hal_device_property_set_string (d, "ssb.bus_id", + hal_util_get_last_element (sysfs_path)); + return d; +} + +static gboolean +ssb_compute_udi (HalDevice *d) +{ + gchar udi[256]; + + hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), + "/org/freedesktop/Hal/devices/ssb_%s", + hal_device_property_get_string (d, "xen.bus_id")); + hal_device_set_udi (d, udi); + hal_device_property_set_string (d, "info.udi", udi); + return TRUE; +} + +/*--------------------------------------------------------------------------------------------------------------*/ + +static HalDevice * ieee1394_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path) { HalDevice *d; @@ -3588,6 +3625,13 @@ .remove = dev_remove }; +static DevHandler dev_handler_ssb = { + .subsystem = "ssb", + .add = ssb_add, + .compute_udi = ssb_compute_udi, + .remove = dev_remove +}; + /* s390 specific busses */ static DevHandler dev_handler_ccw = { .subsystem = "ccw", @@ -3650,6 +3694,7 @@ &dev_handler_mmc, &dev_handler_ieee1394, &dev_handler_xen, + &dev_handler_ssb, &dev_handler_ccw, &dev_handler_ccwgroup, &dev_handler_iucv,