mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
vgimportdevices: fix incorrect deviceidtype usage
When a VG has PVs with different device id types, it would try to use the idtype of the previous PV in the loop. This would produce an unncessary warning, or could lead to using the devname idtype when a better idtype is available.
This commit is contained in:
parent
f840dbb320
commit
151ce8b276
@ -57,8 +57,7 @@ static int _vgimportdevices_single(struct cmd_context *cmd,
|
||||
dm_list_iterate_items(pvl, &vg->pvs) {
|
||||
pv = pvl->pv;
|
||||
|
||||
if (!idtypestr && pv->device_id_type)
|
||||
idtypestr = pv->device_id_type;
|
||||
idtypestr = pv->device_id_type;
|
||||
|
||||
memcpy(pvid, &pvl->pv->id.uuid, ID_LEN);
|
||||
device_id_add(cmd, pv->dev, pvid, idtypestr, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user