diff mbox

[1/3] libmultipath: call get_vpd_uid() if no uid_attribute is set

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

Commit Message

Hannes Reinecke July 15, 2016, 6:48 a.m. UTC
If the uid_attribute is unset we should be calling get_vpd_uid()
directly without waiting for retrigger udev events.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 libmultipath/discovery.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 9fcede7..e9e0313 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1569,6 +1569,9 @@  get_uid (struct path * pp, int path_state)
 					"%s: failed to get udev uid: %s",
 					pp->dev, strerror(-len));
 
+		} else {
+			len = get_vpd_uid(pp);
+			origin = "sysfs";
 		}
 		conf = get_multipath_config();
 		retrigger = conf->retrigger_tries;