hal: Branch 'master'
David Zeuthen
david at kemper.freedesktop.org
Mon Mar 3 17:36:23 PST 2008
hald/linux/device.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit db415dc5b771added0451f518ba3b714f004113e
Author: David Zeuthen <davidz at redhat.com>
Date: Mon Mar 3 20:34:39 2008 -0500
support scsi hosts even when they don't have a physical device
This is needed to properly detect iSCSI disks. Thanks to Peter Jones
<pjones at redhat.com> for setting me up with an iSCSI target for
testing.
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 0e983ee..79e566c 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -784,10 +784,6 @@ scsi_host_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *par
d = NULL;
- if (parent_dev == NULL || parent_path == NULL) {
- goto out;
- }
-
/* ignore useless class device */
if (strstr(sysfs_path, "class/scsi_host") != NULL)
goto out;
@@ -799,7 +795,10 @@ scsi_host_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *par
d = hal_device_new ();
hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
hal_device_property_set_int (d, "scsi_host.host", host_num);
- hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev));
+ 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_device_property_set_string (d, "info.category", "scsi_host");
hal_device_add_capability (d, "scsi_host");
hal_device_property_set_string (d, "info.product", "SCSI Host Adapter");
More information about the hal-commit
mailing list