mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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)
|
if (def->type != pool->def->type)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Don't mach against ourself if re-defining existing pool ! */
|
||||||
|
if (STREQ(pool->def->name, def->name))
|
||||||
|
continue;
|
||||||
|
|
||||||
virStoragePoolObjLock(pool);
|
virStoragePoolObjLock(pool);
|
||||||
|
|
||||||
switch (pool->def->type) {
|
switch (pool->def->type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user