libmultipath: fix has_uid_fallback() logic
authorMartin Wilck <mwilck@suse.com>
Mon, 24 Jun 2019 09:27:52 +0000 (11:27 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 3 Jul 2019 06:32:09 +0000 (08:32 +0200)
commita183a6ae7e98cecf197af0854379a0ee42eb43d3
tree0cf2a8b94cbc1ac5666d552886e10b9d35564a97
parent1313a4e44bebf1a6b51924f88acf9416fc79989e
libmultipath: fix has_uid_fallback() logic

The idea of 061daf40 "Do not automatically fall back to vpd uid
generation" applies not only to SCSI. Use the same logic for NVMe.
Allow fallback in two cases:
 - uid_attribute has the default value for the bus in question
 - uid_attribute has been set to "" to disable udev-based WWID checking
As uid_fallback() has only one caller, no need to check the conditions
there again.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/defaults.h
libmultipath/discovery.c
libmultipath/hwtable.c
tests/hwtable.c