From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Varoqui Subject: Re: [PATCH] multipath: rlookup WWIDs with spaces by alias Date: Sat, 12 Nov 2011 11:18:15 +0100 Message-ID: <1321093095.14506.8.camel@lapoo.opensvc.com> References: <20111112045426.GD24133@ether.msp.redhat.com> Reply-To: christophe.varoqui@opensvc.com, device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111112045426.GD24133@ether.msp.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Benjamin Marzinski Cc: device-mapper development List-Id: dm-devel.ids On ven., 2011-11-11 at 22:54 -0600, Benjamin Marzinski wrote: > If a WWID contained spaces, the rlookup code wasn't able to look it up > by its user_friendly_name, since the code was only reading the wwid till > the first space. It now reads to the end of the line. > Applied > Signed-off-by: Benjamin Marzinski > --- > libmultipath/alias.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: multipath-tools-110412/libmultipath/alias.c > =================================================================== > --- multipath-tools-110412.orig/libmultipath/alias.c > +++ multipath-tools-110412/libmultipath/alias.c > @@ -288,7 +288,7 @@ rlookup_binding(FILE *f, char **map_wwid > curr_id = scan_devname(alias, NULL); /* TBD: Why this call? */ > if (curr_id >= id) > id = curr_id + 1; > - wwid = strtok(NULL, " \t"); > + wwid = strtok(NULL, ""); > if (!wwid){ > condlog(3, > "Ignoring malformed line %u in bindings file",