提交 c85013b9 编写于 作者: D Daniel P. Berrange

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
上级 243f1857
...@@ -1711,6 +1711,10 @@ int virStoragePoolSourceFindDuplicate(virStoragePoolObjListPtr pools, ...@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册