[PATCH 29/57] Only filter for udev property if uid_attribute is present

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

 



It only makes sense to filter for an existing udev property if the
'uid_attribute' variable is set. Otherwise multipath did not
get the uid from udev and so we might not even have udev information.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 libmultipath/configure.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index ca20ba5..0076485 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -967,7 +967,8 @@ get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid)
 				return ret;
 			}
 		}
-		if (pp->udev && filter_property(conf, pp->udev) > 0)
+		if (pp->udev && pp->uid_attribute &&
+		    filter_property(conf, pp->udev) > 0)
 			return 2;
 
 		refwwid = pp->wwid;
@@ -994,7 +995,8 @@ get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid)
 				return ret;
 			}
 		}
-		if (pp->udev && filter_property(conf, pp->udev) > 0)
+		if (pp->udev && pp->uid_attribute &&
+		    filter_property(conf, pp->udev) > 0)
 			return 2;
 
 		refwwid = pp->wwid;
@@ -1017,7 +1019,8 @@ get_refwwid (char * dev, enum devtypes dev_type, vector pathvec, char **wwid)
 					dev);
 			return ret;
 		}
-		if (pp->udev && filter_property(conf, pp->udev) > 0)
+		if (pp->udev && pp->uid_attribute &&
+		    filter_property(conf, pp->udev) > 0)
 			return 2;
 
 		refwwid = pp->wwid;
-- 
2.6.6

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