diff mbox

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

Message ID 1466410153-23896-11-git-send-email-hare@suse.de (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Hannes Reinecke June 20, 2016, 8:08 a.m. UTC
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@suse.com>
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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