]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: Use virStoragePoolSourceMatchSingleHost for NETFS
authorJohn Ferlan <jferlan@redhat.com>
Wed, 1 Apr 2015 18:09:05 +0000 (14:09 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 15 Apr 2015 10:40:07 +0000 (06:40 -0400)
Rather than have duplicate code doing the same check, have the netfs
matching processing code use the new virStoragePoolSourceMatchSingleHost.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/conf/storage_conf.c

index 313098bbe1cfd983f5a651d23b58b96dabf576fb..bb89bb75784b1c2f34ed4a674d21310ea2751f84 100644 (file)
@@ -2464,9 +2464,9 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
                 matchpool = pool;
             break;
         case VIR_STORAGE_POOL_NETFS:
-            if ((STREQ(pool->def->source.dir, def->source.dir)) \
-                && (pool->def->source.nhost == 1 && def->source.nhost == 1) \
-                && (STREQ(pool->def->source.hosts[0].name, def->source.hosts[0].name)))
+            if (STREQ(pool->def->source.dir, def->source.dir) &&
+                virStoragePoolSourceMatchSingleHost(&pool->def->source,
+                                                    &def->source))
                 matchpool = pool;
             break;
         case VIR_STORAGE_POOL_SCSI: