[PATCH 3/3] vz: fixes: snapshot: Factor out virDomainMomentDef class

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

 



Fix for commit ffc0fbebe refactoring snapshot code.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 src/vz/vz_driver.c |  2 +-
 src/vz/vz_sdk.c    | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 20cc79b..d327cac 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2620,7 +2620,7 @@ vzDomainSnapshotCreateXML(virDomainPtr domain,
         goto cleanup;
 
     /* snaphot name is ignored, it will be set to auto generated by sdk uuid */
-    if (prlsdkCreateSnapshot(dom, def->description) < 0)
+    if (prlsdkCreateSnapshot(dom, def->common.description) < 0)
         goto cleanup;
 
     if (!(snapshots = prlsdkLoadSnapshots(dom)))
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 92bcb3d..3d89435 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -4699,14 +4699,14 @@ prlsdkParseSnapshotTree(const char *treexml)
 
         ctxt->node = nodes[i];
 
-        def->name = virXPathString("string(./@guid)", ctxt);
-        if (!def->name) {
+        def->common.name = virXPathString("string(./@guid)", ctxt);
+        if (!def->common.name) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("missing 'guid' attribute"));
             goto cleanup;
         }
 
-        def->parent = virXPathString("string(../@guid)", ctxt);
+        def->common.parent = virXPathString("string(../@guid)", ctxt);
 
         xmlstr = virXPathString("string(./DateTime)", ctxt);
         if (!xmlstr) {
@@ -4714,11 +4714,11 @@ prlsdkParseSnapshotTree(const char *treexml)
                            _("missing 'DateTime' element"));
             goto cleanup;
         }
-        if ((def->creationTime = prlsdkParseDateTime(xmlstr)) < 0)
+        if ((def->common.creationTime = prlsdkParseDateTime(xmlstr)) < 0)
             goto cleanup;
         VIR_FREE(xmlstr);
 
-        def->description = virXPathString("string(./Description)", ctxt);
+        def->common.description = virXPathString("string(./Description)", ctxt);
 
         def->memory = VIR_DOMAIN_SNAPSHOT_LOCATION_NONE;
         xmlstr = virXPathString("string(./@state)", ctxt);
-- 
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