[dm-devel] [PATCH 10/26] libmultipath: fallback to checking environment variable in get_udev_uid()
Hannes Reinecke
hare at suse.de
Mon Jun 20 08:08:57 UTC 2016
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 at suse.com>
---
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
More information about the dm-devel
mailing list