summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@web.de>2010-03-15 18:59:10 +0100
committerDanny Kukawka <danny.kukawka@web.de>2010-03-15 19:27:40 +0100
commitc404ccdebe695ed3ad76175b21282b334475373e (patch)
treefbe268492383f3f8e99742480dc8ba9ba2847490
parent2f34097e359b8868569e30511d497639f2983566 (diff)
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.c10
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");