diff options
author | Danny Kukawka <danny.kukawka@web.de> | 2010-03-15 18:59:10 +0100 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2010-03-15 19:27:40 +0100 |
commit | c404ccdebe695ed3ad76175b21282b334475373e (patch) | |
tree | fbe268492383f3f8e99742480dc8ba9ba2847490 | |
parent | 2f34097e359b8868569e30511d497639f2983566 (diff) | |
download | hal-c404ccdebe695ed3ad76175b21282b334475373e.tar.gz |
added new key scsi.transport to identify FC/iSCSI/SAS
Added new key scsi.transport for SCSI devices to identify e.g.
FiberChannel, iSCSI or SAS. This allow to handle them in FDI
files (e.g. set volume.ignore or storage.automount_enabled_hint).
-rw-r--r-- | hald/linux/device.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hald/linux/device.c b/hald/linux/device.c index 95ba3ae1..b3846119 100644 --- a/hald/linux/device.c +++ b/hald/linux/device.c @@ -2885,6 +2885,16 @@ scsi_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_d hal_device_property_set_int (d, "scsi.target", target_num); hal_device_property_set_int (d, "scsi.lun", lun_num); + if (strstr(sysfs_path, "/host") != NULL && strstr(sysfs_path, "/target") != NULL) { + if (strstr(sysfs_path, "/rport-") != NULL) { + hal_device_property_set_string (d, "scsi.transport", "FC"); + } else if (strstr(sysfs_path, "/session") != NULL) { + hal_device_property_set_string (d, "scsi.transport", "iSCSI"); + } else if (strstr(sysfs_path, "/port-") != NULL && strstr(sysfs_path, "/end_device-") != NULL) { + hal_device_property_set_string (d, "scsi.transport", "SAS"); + } + } + hal_util_set_driver (d, "info.linux.driver", sysfs_path); hal_device_property_set_string (d, "info.product", "SCSI Device"); |