[PATCH 10/26] libmultipath: fallback to checking environment variable in get_udev_uid()

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

 



If we cannot get the udev attribute via udev we should always fallback
to checking the environment variable; there is no need to restrict
it to a specific command.

Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 6fc2e8f..019faef 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1479,7 +1479,7 @@ get_udev_uid(struct path * pp, char *uid_attribute)
 
 	value = udev_device_get_property_value(pp->udev,
 					       uid_attribute);
-	if ((!value || strlen(value) == 0) && conf->cmd == CMD_VALID_PATH)
+	if (!value || strlen(value) == 0)
 		value = getenv(uid_attribute);
 	if (value && strlen(value)) {
 		if (strlen(value) + 1 > WWID_SIZE) {
-- 
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