Re: multipath bug and patch

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

 



   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.  

   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.

   I'll have a cleaner patch sent up this weekend.

James Shoemaker

On Fri, Nov 4, 2016 at 11:45 AM, Benjamin Marzinski <bmarzins@xxxxxxxxxx> wrote:
On Thu, Nov 03, 2016 at 01:34:17PM -0500, James Shoemaker wrote:
>       If a device returns an empty string for inquiry data the current
>    multipath tool ignores it on reload.  I added the following patch and I
>    can hotplug these devices that don't return all the proper data.

I feel like returning "none" if you try and strchop an empty string is
pretty surprising behavior. I'd rather see this dealt with in the
function that has problems with the empty string.

-Ben

>
>    diff --git a/libmultipath/util.c b/libmultipath/util.c
>    index ac0d1b2..045e660 100644
>    --- a/libmultipath/util.c
>    +++ b/libmultipath/util.c
>    @@ -17,6 +17,10 @@ strchop(char *str)
>     
>            for (i=strlen(str)-1; i >=0 && isspace(str[i]); --i) ;
>            str[++i] = '\0';
>    +       if(strlen(str)==0)
>    +       {
>    +               strcpy(str,"none");
>    +       }
>            return strlen(str);
>     }
>
>    James Shoemaker

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


--
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