mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-21 10:50:24 +03:00
Fix storage pool source comparison to avoid comparing with self
If we are comparing storage pools we must skip comparing with ourself, so that re-defining an existing pool works * conf/storage_conf.c: Skip self when comparing
This commit is contained in:
parent
243f185742
commit
c85013b90d
@ -1711,6 +1711,10 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools,
|
||||
if (def->type != pool->def->type)
|
||||
continue;
|
||||
|
||||
/* Don't mach against ourself if re-defining existing pool ! */
|
||||
if (STREQ(pool->def->name, def->name))
|
||||
continue;
|
||||
|
||||
virStoragePoolObjLock(pool);
|
||||
|
||||
switch (pool->def->type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user