Blame SOURCES/0042-vgimportdevices-fix-incorrect-deviceidtype-usage.patch

ab86b0
From 4aa92f3e18cb49470ee9b5d928abe6b4c86f3074 Mon Sep 17 00:00:00 2001
ab86b0
From: David Teigland <teigland@redhat.com>
ab86b0
Date: Wed, 6 Apr 2022 12:20:26 -0500
ab86b0
Subject: [PATCH 42/54] vgimportdevices: fix incorrect deviceidtype usage
ab86b0
ab86b0
When a VG has PVs with different device id types,
ab86b0
it would try to use the idtype of the previous PV
ab86b0
in the loop.  This would produce an unncessary warning,
ab86b0
or could lead to using the devname idtype when a better
ab86b0
idtype is available.
ab86b0
---
ab86b0
 tools/vgimportdevices.c | 3 +--
ab86b0
 1 file changed, 1 insertion(+), 2 deletions(-)
ab86b0
ab86b0
diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c
ab86b0
index 2580613c4..ea205d941 100644
ab86b0
--- a/tools/vgimportdevices.c
ab86b0
+++ b/tools/vgimportdevices.c
ab86b0
@@ -57,8 +57,7 @@ static int _vgimportdevices_single(struct cmd_context *cmd,
ab86b0
 	dm_list_iterate_items(pvl, &vg->pvs) {
ab86b0
 		pv = pvl->pv;
ab86b0
 
ab86b0
-		if (!idtypestr && pv->device_id_type)
ab86b0
-			idtypestr = pv->device_id_type;
ab86b0
+		idtypestr = pv->device_id_type;
ab86b0
 
ab86b0
 		memcpy(pvid, &pvl->pv->id.uuid, ID_LEN);
ab86b0
 		device_id_add(cmd, pv->dev, pvid, idtypestr, NULL);
ab86b0
-- 
ab86b0
2.34.3
ab86b0