<div dir="ltr"> I can add those checks instead. I'll look at it this weekend and make up a new set of patches. I'll admit my fix is a bit of a hack. <div><br></div><div> If I remember I did it this way to reduce the amount of change required. I hacked this in something like 2 years ago and kept telling myself I needed to push a change upstream so I didn't have to keep rebuilding libmultipath every time I updated things.</div><div><br></div><div> I'll have a cleaner patch sent up this weekend.<br><div><br></div><div>James Shoemaker</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 4, 2016 at 11:45 AM, Benjamin Marzinski <span dir="ltr"><<a href="mailto:bmarzins@redhat.com" target="_blank">bmarzins@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Nov 03, 2016 at 01:34:17PM -0500, James Shoemaker wrote:<br>
> If a device returns an empty string for inquiry data the current<br>
> multipath tool ignores it on reload. I added the following patch and I<br>
> can hotplug these devices that don't return all the proper data.<br>
<br>
I feel like returning "none" if you try and strchop an empty string is<br>
pretty surprising behavior. I'd rather see this dealt with in the<br>
function that has problems with the empty string.<br>
<br>
-Ben<br>
<br>
><br>
> diff --git a/libmultipath/util.c b/libmultipath/util.c<br>
> index ac0d1b2..045e660 100644<br>
> --- a/libmultipath/util.c<br>
> +++ b/libmultipath/util.c<br>
> @@ -17,6 +17,10 @@ strchop(char *str)<br>
> <br>
> for (i=strlen(str)-1; i >=0 && isspace(str[i]); --i) ;<br>
> str[++i] = '\0';<br>
> + if(strlen(str)==0)<br>
> + {<br>
> + strcpy(str,"none");<br>
> + }<br>
> return strlen(str);<br>
> }<br>
><br>
> James Shoemaker<br>
<span class="HOEnZb"><font color="#888888"><br>
> --<br>
> dm-devel mailing list<br>
> <a href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/dm-devel" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/dm-devel</a><br>
<br>
</font></span></blockquote></div><br></div>