[PATCH 02/10] conf: snapshot: don't pass flags from different family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virDomainDiskSourceParse expects VIR_DOMAIN_DEF_PARSE_* values
in @flags and we pass VIR_DOMAIN_SNAPSHOT_PARSE_* values. Fortunately
sources of type 'file' and 'block' do not take flags into account
and for source of type 'network' flags only make difference for
tlsFromConfig atribute which is never passed I guess and never
used.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 src/conf/snapshot_conf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 7386b4a..db55b4f 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -108,7 +108,6 @@ static int
 virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
                                  xmlXPathContextPtr ctxt,
                                  virDomainSnapshotDiskDefPtr def,
-                                 unsigned int flags,
                                  virDomainXMLOptionPtr xmlopt)
 {
     int ret = -1;
@@ -154,7 +153,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
     }
 
     if ((cur = virXPathNode("./source", ctxt)) &&
-        virDomainDiskSourceParse(cur, ctxt, def->src, flags, xmlopt) < 0)
+        virDomainDiskSourceParse(cur, ctxt, def->src, 0, xmlopt) < 0)
         goto cleanup;
 
     if ((driver = virXPathString("string(./driver/@type)", ctxt)) &&
@@ -339,7 +338,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
         def->ndisks = n;
         for (i = 0; i < def->ndisks; i++) {
             if (virDomainSnapshotDiskDefParseXML(nodes[i], ctxt, &def->disks[i],
-                                                 flags, xmlopt) < 0)
+                                                 xmlopt) < 0)
                 goto cleanup;
         }
         VIR_FREE(nodes);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux