Skip to content
Snippets Groups Projects
Commit 764a29cb authored by Guido Günther's avatar Guido Günther
Browse files

New patch Fix-storage-pool-source-comparison-to-avoid-comparin.patch

Fix storage pool source comparison to avoid comparing with self
Thanks: "Daniel P. Berrange"
parent c0292f7f
No related branches found
No related tags found
No related merge requests found
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Fri, 7 Oct 2011 17:38:09 +0100
Subject: 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
---
src/conf/storage_conf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 18cbfdb..dadc115 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -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) {
--
...@@ -9,3 +9,5 @@ Disable-daemon-start-test.patch ...@@ -9,3 +9,5 @@ Disable-daemon-start-test.patch
Disable-gnulib-s-test-nonplocking-pipe.sh.patch Disable-gnulib-s-test-nonplocking-pipe.sh.patch
Disable-failing-virnetsockettest.patch Disable-failing-virnetsockettest.patch
debian/Don-t-require-gawk-for-a-simple-print-expression.patch debian/Don-t-require-gawk-for-a-simple-print-expression.patch
Skip-socket-test-if-we-exceed-UNIX_PATH_MAX.patch
Fix-storage-pool-source-comparison-to-avoid-comparin.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment