dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools/libmultipath discovery.c
Date: 25 May 2010 23:23:08 -0000	[thread overview]
Message-ID: <20100525232308.18704.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL4_FC5
Changes by:	bmarzins@sourceware.org	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;

             reply	other threads:[~2010-05-25 23:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 23:23 bmarzins [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-07-20 21:24 multipath-tools/libmultipath discovery.c bmarzins
2011-03-07 15:45 bmarzins
2010-08-11 23:05 bmarzins
2009-11-23 21:08 bmarzins
2008-04-14 17:59 bmarzins
2008-03-05 20:53 bmarzins
2006-10-06 18:35 bmarzins
2006-10-06 18:09 bmarzins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100525232308.18704.qmail@sourceware.org \
    --to=bmarzins@sourceware.org \
    --cc=dm-cvs@sourceware.org \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).