hal: Branch 'master' - 2 commits

Kay Sievers kay at kemper.freedesktop.org
Mon Jul 13 04:53:29 PDT 2009


 configure.in        |    3 ++-
 hald/linux/device.c |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

New commits:
commit 69f27465d76e06d3173613a9567312ac62064748
Author: Kay Sievers <kay.sievers at vrfy.org>
Date:   Mon Jul 13 13:52:57 2009 +0200

    use AM_SILENT_RULES if available

diff --git a/configure.in b/configure.in
index 87d150e..22e7f03 100644
--- a/configure.in
+++ b/configure.in
@@ -10,6 +10,7 @@ AC_PREREQ(2.59c)
 AC_INIT(hal, 0.5.13, david at fubar.dk)
 AM_INIT_AUTOMAKE([gnu 1.9])
 AM_MAINTAINER_MODE
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 glib_module="glib-2.0 >= 2.10.0 gobject-2.0 > 2.10.0 dbus-glib-1 >= 0.61"
 dbus_module="dbus-1 >= 0.61"
@@ -488,7 +489,7 @@ else
         *-*-solaris*)
 		   HALD_BACKEND="solaris"
 		   ;;
-        *-*-freebsd* | *-*-kfreebsd*-gnu)
+        *-*-freebsd* | *-*-kfreebsd*-gnu)
                    HALD_BACKEND="freebsd"
                    ;;
 	*-linux*)
commit f710e0fda727d102291a44d1ce153ea22eac6c3e
Author: Pavan Naregundi <pavan at linux.vnet.ibm.com>
Date:   Mon Jul 13 13:38:27 2009 +0200

    add suport for /sys/bus/ibmebus
    
    HAL was failing to recognize ehea ethernet adapters under /sys/bus/ibmebus.
      https://bugzilla.redhat.com/show_bug.cgi?id=496820
    
    After the patch ehea adapters are under ibmebus in the lshal --tree
     ibmebus/lhea_23c00200
      ibmebus/lhea_23c00200/ethernet_23e00100
        net_00_21_5e_03_1d_21

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 653c9fe..2823650 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -758,6 +758,44 @@ firewire_compute_udi (HalDevice *d)
 
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
+static HalDevice *
+ibmebus_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", "ibmebus");
+	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_util_set_string_from_file (d, "ibmebus.devspec", sysfs_path, "devspec");
+	hal_util_set_string_from_file (d, "ibmebus.type", sysfs_path, "type");
+
+	return d;
+}
+
+
+static gboolean
+ibmebus_compute_udi (HalDevice *d)
+{
+	gchar udi[256];
+
+	hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+			      "/org/freedesktop/Hal/devices/ibmebus%s",
+			      hal_device_property_get_string (d, "ibmebus.devspec"));
+	hal_device_set_udi (d, udi);
+	hal_device_property_set_string (d, "info.udi", udi);
+	return TRUE;
+}
 
 /*--------------------------------------------------------------------------------------------------------------*/
 
@@ -4288,6 +4326,13 @@ static DevHandler dev_handler_firewire = {
 	.remove       = dev_remove
 };
 
+static DevHandler dev_handler_ibmebus = { 
+	.subsystem   = "ibmebus",
+	.add         = ibmebus_add,
+	.compute_udi = ibmebus_compute_udi,
+	.remove      = dev_remove
+};
+
 static DevHandler dev_handler_ide = { 
 	.subsystem   = "ide",
 	.add         = ide_add,
@@ -4610,6 +4655,7 @@ static DevHandler *dev_handlers[] = {
 	&dev_handler_drm,
 	&dev_handler_dvb,
 	&dev_handler_firewire,
+	&dev_handler_ibmebus,
 	&dev_handler_ide,
 	&dev_handler_ieee1394,
 	&dev_handler_input,


More information about the hal-commit mailing list