multipath-tools/libmultipath discovery.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL4_FC5
Changes by:	bmarzins@xxxxxxxxxxxxxx	2010-05-25 23:23:07

Modified files:
	libmultipath   : discovery.c 

Log message:
	Fix for bz #512065
	If you can't get /sys/class/fc_transport/target%i:%i:%i/node_name, try
	/sys/class/fc_transport/target%i:%i:%i/node_name.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.28.2.7&r2=1.28.2.8

--- multipath-tools/libmultipath/discovery.c	2008/04/14 17:59:54	1.28.2.7
+++ multipath-tools/libmultipath/discovery.c	2010/05/25 23:23:07	1.28.2.8
@@ -553,6 +553,21 @@
 	if (0 <= readattr(attr_path, attr_buff) && strlen(attr_buff) > 0)
 		strncpy(curpath->tgt_node_name, attr_buff,
 			strlen(attr_buff) - 1);
+	else {
+		if(safe_sprintf(attr_path,
+			"%s/class/iscsi_transport/target%i:%i:%i/target_name",
+				sysfs_path,
+				curpath->sg_id.host_no,
+				curpath->sg_id.channel,
+				curpath->sg_id.scsi_id)) {
+			condlog(0, "attr_path too small");
+			return 1;
+		}
+		if (0 <= readattr(attr_path, attr_buff) &&
+		    strlen(attr_buff) > 0)
+			strncpy(curpath->tgt_node_name, attr_buff,
+				strlen(attr_buff) - 1);
+	}
 	condlog(3, "tgt_node_name = %s", curpath->tgt_node_name);
 
 	return 0;

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux