mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_02_184-apply-obtain_device_list_from_udev-to-all-libudev-us.patch

c63e28
 lib/device/dev-type.c | 6 ++++++
c63e28
 1 file changed, 6 insertions(+)
c63e28
c63e28
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
c63e28
index 331fe07..60b0d78 100644
c63e28
--- a/lib/device/dev-type.c
c63e28
+++ b/lib/device/dev-type.c
c63e28
@@ -1062,6 +1062,9 @@ int udev_dev_is_mpath_component(struct device *dev)
c63e28
 	const char *value;
c63e28
 	int ret = 0;
c63e28
 
c63e28
+	if (!obtain_device_list_from_udev())
c63e28
+		return 0;
c63e28
+
c63e28
 	if (!(udev_device = _udev_get_dev(dev)))
c63e28
 		return 0;
c63e28
 
c63e28
@@ -1091,6 +1094,9 @@ int udev_dev_is_md_component(struct device *dev)
c63e28
 	const char *value;
c63e28
 	int ret = 0;
c63e28
 
c63e28
+	if (!obtain_device_list_from_udev())
c63e28
+		return 0;
c63e28
+
c63e28
 	if (!(udev_device = _udev_get_dev(dev)))
c63e28
 		return 0;
c63e28