6d3351
From 7cf2eee78e7e0e08eb1203f7fdb5705aba6b0e42 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <7cf2eee78e7e0e08eb1203f7fdb5705aba6b0e42@dist-git>
6d3351
From: Jiri Denemark <jdenemar@redhat.com>
6d3351
Date: Fri, 2 Jun 2017 00:44:46 +0200
6d3351
Subject: [PATCH] conf: Add save cookie callbacks to xmlopt
6d3351
6d3351
virDomainXMLOption gains driver specific callbacks for parsing and
6d3351
formatting save cookies.
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6d3351
(cherry picked from commit 25af7e950a9e35a6cffeed32bbcdd95dd7e01035)
6d3351
6d3351
https://bugzilla.redhat.com/show_bug.cgi?id=1441662
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/bhyve/bhyve_domain.c      |  2 +-
6d3351
 src/conf/domain_conf.c        | 16 +++++++++++++++-
6d3351
 src/conf/domain_conf.h        |  7 ++++++-
6d3351
 src/conf/snapshot_conf.c      | 11 ++++++++++-
6d3351
 src/conf/snapshot_conf.h      |  2 ++
6d3351
 src/libvirt_private.syms      |  1 +
6d3351
 src/libxl/libxl_conf.c        |  2 +-
6d3351
 src/lxc/lxc_conf.c            |  2 +-
6d3351
 src/openvz/openvz_driver.c    |  2 +-
6d3351
 src/phyp/phyp_driver.c        |  2 +-
6d3351
 src/qemu/qemu_capabilities.c  |  2 +-
6d3351
 src/qemu/qemu_conf.c          |  3 ++-
6d3351
 src/security/virt-aa-helper.c |  2 +-
6d3351
 src/test/test_driver.c        |  2 +-
6d3351
 src/uml/uml_driver.c          |  2 +-
6d3351
 src/vbox/vbox_common.c        |  2 +-
6d3351
 src/vmware/vmware_driver.c    |  3 ++-
6d3351
 src/vmx/vmx.c                 |  2 +-
6d3351
 src/vz/vz_driver.c            |  2 +-
6d3351
 src/xen/xen_driver.c          |  2 +-
6d3351
 src/xenapi/xenapi_driver.c    |  2 +-
6d3351
 tests/bhyveargv2xmltest.c     |  2 +-
6d3351
 tests/testutils.c             |  2 +-
6d3351
 23 files changed, 54 insertions(+), 21 deletions(-)
6d3351
6d3351
diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c
6d3351
index 0a99550afa..20c82937b5 100644
6d3351
--- a/src/bhyve/bhyve_domain.c
6d3351
+++ b/src/bhyve/bhyve_domain.c
6d3351
@@ -144,7 +144,7 @@ virBhyveDriverCreateXMLConf(bhyveConnPtr driver)
6d3351
     virBhyveDriverDomainDefParserConfig.priv = driver;
6d3351
     return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
6d3351
                                  &virBhyveDriverPrivateDataCallbacks,
6d3351
-                                 NULL, NULL);
6d3351
+                                 NULL, NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
6d3351
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
6d3351
index 395dcc0531..b473ce6b1e 100644
6d3351
--- a/src/conf/domain_conf.c
6d3351
+++ b/src/conf/domain_conf.c
6d3351
@@ -79,6 +79,9 @@ struct _virDomainXMLOption {
6d3351
 
6d3351
     /* ABI stability callbacks */
6d3351
     virDomainABIStability abi;
6d3351
+
6d3351
+    /* Private data for save image stored in snapshot XML */
6d3351
+    virSaveCookieCallbacks saveCookie;
6d3351
 };
6d3351
 
6d3351
 #define VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS             \
6d3351
@@ -1054,7 +1057,8 @@ virDomainXMLOptionPtr
6d3351
 virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
6d3351
                       virDomainXMLPrivateDataCallbacksPtr priv,
6d3351
                       virDomainXMLNamespacePtr xmlns,
6d3351
-                      virDomainABIStabilityPtr abi)
6d3351
+                      virDomainABIStabilityPtr abi,
6d3351
+                      virSaveCookieCallbacksPtr saveCookie)
6d3351
 {
6d3351
     virDomainXMLOptionPtr xmlopt;
6d3351
 
6d3351
@@ -1076,6 +1080,9 @@ virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
6d3351
     if (abi)
6d3351
         xmlopt->abi = *abi;
6d3351
 
6d3351
+    if (saveCookie)
6d3351
+        xmlopt->saveCookie = *saveCookie;
6d3351
+
6d3351
     /* Technically this forbids to use one of Xerox's MAC address prefixes in
6d3351
      * our hypervisor drivers. This shouldn't ever be a problem.
6d3351
      *
6d3351
@@ -1106,6 +1113,13 @@ virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
6d3351
 }
6d3351
 
6d3351
 
6d3351
+virSaveCookieCallbacksPtr
6d3351
+virDomainXMLOptionGetSaveCookie(virDomainXMLOptionPtr xmlopt)
6d3351
+{
6d3351
+    return &xmlopt->saveCookie;
6d3351
+}
6d3351
+
6d3351
+
6d3351
 void
6d3351
 virBlkioDeviceArrayClear(virBlkioDevicePtr devices,
6d3351
                          int ndevices)
6d3351
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
6d3351
index d64ef1b6e9..706d106ad9 100644
6d3351
--- a/src/conf/domain_conf.h
6d3351
+++ b/src/conf/domain_conf.h
6d3351
@@ -55,6 +55,7 @@
6d3351
 # include "virgic.h"
6d3351
 # include "virperf.h"
6d3351
 # include "virtypedparam.h"
6d3351
+# include "virsavecookie.h"
6d3351
 
6d3351
 /* forward declarations of all device types, required by
6d3351
  * virDomainDeviceDef
6d3351
@@ -2549,7 +2550,11 @@ struct _virDomainABIStability {
6d3351
 virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
6d3351
                                             virDomainXMLPrivateDataCallbacksPtr priv,
6d3351
                                             virDomainXMLNamespacePtr xmlns,
6d3351
-                                            virDomainABIStabilityPtr abi);
6d3351
+                                            virDomainABIStabilityPtr abi,
6d3351
+                                            virSaveCookieCallbacksPtr saveCookie);
6d3351
+
6d3351
+virSaveCookieCallbacksPtr
6d3351
+virDomainXMLOptionGetSaveCookie(virDomainXMLOptionPtr xmlopt);
6d3351
 
6d3351
 void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
6d3351
 
6d3351
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
6d3351
index e3bba985d7..6330f7d1f9 100644
6d3351
--- a/src/conf/snapshot_conf.c
6d3351
+++ b/src/conf/snapshot_conf.c
6d3351
@@ -102,6 +102,7 @@ void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def)
6d3351
         virDomainSnapshotDiskDefClear(&def->disks[i]);
6d3351
     VIR_FREE(def->disks);
6d3351
     virDomainDefFree(def->dom);
6d3351
+    virObjectUnref(def->cookie);
6d3351
     VIR_FREE(def);
6d3351
 }
6d3351
 
6d3351
@@ -214,6 +215,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
6d3351
     char *memorySnapshot = NULL;
6d3351
     char *memoryFile = NULL;
6d3351
     bool offline = !!(flags & VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE);
6d3351
+    virSaveCookieCallbacksPtr saveCookie = virDomainXMLOptionGetSaveCookie(xmlopt);
6d3351
 
6d3351
     if (VIR_ALLOC(def) < 0)
6d3351
         goto cleanup;
6d3351
@@ -365,6 +367,9 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
6d3351
         def->current = active != 0;
6d3351
     }
6d3351
 
6d3351
+    if (!offline && virSaveCookieParse(ctxt, &def->cookie, saveCookie) < 0)
6d3351
+        goto cleanup;
6d3351
+
6d3351
     ret = def;
6d3351
 
6d3351
  cleanup:
6d3351
@@ -691,7 +696,7 @@ char *
6d3351
 virDomainSnapshotDefFormat(const char *domain_uuid,
6d3351
                            virDomainSnapshotDefPtr def,
6d3351
                            virCapsPtr caps,
6d3351
-                           virDomainXMLOptionPtr xmlopt ATTRIBUTE_UNUSED,
6d3351
+                           virDomainXMLOptionPtr xmlopt,
6d3351
                            unsigned int flags,
6d3351
                            int internal)
6d3351
 {
6d3351
@@ -751,6 +756,10 @@ virDomainSnapshotDefFormat(const char *domain_uuid,
6d3351
         virBufferAddLit(&buf, "</domain>\n");
6d3351
     }
6d3351
 
6d3351
+    if (virSaveCookieFormatBuf(&buf, def->cookie,
6d3351
+                               virDomainXMLOptionGetSaveCookie(xmlopt)) < 0)
6d3351
+        goto error;
6d3351
+
6d3351
     if (internal)
6d3351
         virBufferAsprintf(&buf, "<active>%d</active>\n", def->current);
6d3351
 
6d3351
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
6d3351
index 2ce526fa6b..1d663c77bc 100644
6d3351
--- a/src/conf/snapshot_conf.h
6d3351
+++ b/src/conf/snapshot_conf.h
6d3351
@@ -76,6 +76,8 @@ struct _virDomainSnapshotDef {
6d3351
 
6d3351
     virDomainDefPtr dom;
6d3351
 
6d3351
+    virObjectPtr cookie;
6d3351
+
6d3351
     /* Internal use.  */
6d3351
     bool current; /* At most one snapshot in the list should have this set */
6d3351
 };
6d3351
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
6d3351
index b4769080e8..88e3f4b8ac 100644
6d3351
--- a/src/libvirt_private.syms
6d3351
+++ b/src/libvirt_private.syms
6d3351
@@ -533,6 +533,7 @@ virDomainWatchdogActionTypeToString;
6d3351
 virDomainWatchdogModelTypeFromString;
6d3351
 virDomainWatchdogModelTypeToString;
6d3351
 virDomainXMLOptionGetNamespace;
6d3351
+virDomainXMLOptionGetSaveCookie;
6d3351
 virDomainXMLOptionNew;
6d3351
 
6d3351
 
6d3351
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
6d3351
index dd345c22cf..28d31db158 100644
6d3351
--- a/src/libxl/libxl_conf.c
6d3351
+++ b/src/libxl/libxl_conf.c
6d3351
@@ -2147,5 +2147,5 @@ libxlCreateXMLConf(void)
6d3351
 {
6d3351
     return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
6d3351
                                  &libxlDomainXMLPrivateDataCallbacks,
6d3351
-                                 NULL, NULL);
6d3351
+                                 NULL, NULL, NULL);
6d3351
 }
6d3351
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
6d3351
index b46fbc58ff..8adc408c32 100644
6d3351
--- a/src/lxc/lxc_conf.c
6d3351
+++ b/src/lxc/lxc_conf.c
6d3351
@@ -213,7 +213,7 @@ lxcDomainXMLConfInit(void)
6d3351
     return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
6d3351
                                  &virLXCDriverPrivateDataCallbacks,
6d3351
                                  &virLXCDriverDomainXMLNamespace,
6d3351
-                                 NULL);
6d3351
+                                 NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 
6d3351
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
6d3351
index 44a6631a99..4392aa64c0 100644
6d3351
--- a/src/openvz/openvz_driver.c
6d3351
+++ b/src/openvz/openvz_driver.c
6d3351
@@ -1493,7 +1493,7 @@ static virDrvOpenStatus openvzConnectOpen(virConnectPtr conn,
6d3351
         goto cleanup;
6d3351
 
6d3351
     if (!(driver->xmlopt = virDomainXMLOptionNew(&openvzDomainDefParserConfig,
6d3351
-                                                 NULL, NULL, NULL)))
6d3351
+                                                 NULL, NULL, NULL, NULL)))
6d3351
         goto cleanup;
6d3351
 
6d3351
     if (openvzLoadDomains(driver) < 0)
6d3351
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
6d3351
index e85f66ffab..32cb681c75 100644
6d3351
--- a/src/phyp/phyp_driver.c
6d3351
+++ b/src/phyp/phyp_driver.c
6d3351
@@ -1199,7 +1199,7 @@ phypConnectOpen(virConnectPtr conn,
6d3351
         goto failure;
6d3351
 
6d3351
     if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(&virPhypDriverDomainDefParserConfig,
6d3351
-                                                      NULL, NULL, NULL)))
6d3351
+                                                      NULL, NULL, NULL, NULL)))
6d3351
         goto failure;
6d3351
 
6d3351
     conn->privateData = phyp_driver;
6d3351
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
6d3351
index 72d3f25763..29bb9949af 100644
6d3351
--- a/src/qemu/qemu_capabilities.c
6d3351
+++ b/src/qemu/qemu_capabilities.c
6d3351
@@ -5027,7 +5027,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
6d3351
         goto ignore;
6d3351
     }
6d3351
 
6d3351
-    if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL)) ||
6d3351
+    if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL)) ||
6d3351
         !(cmd->vm = virDomainObjNew(xmlopt)))
6d3351
         goto cleanup;
6d3351
 
6d3351
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
6d3351
index 76eed25277..96956b7779 100644
6d3351
--- a/src/qemu/qemu_conf.c
6d3351
+++ b/src/qemu/qemu_conf.c
6d3351
@@ -908,7 +908,8 @@ virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
6d3351
     return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
6d3351
                                  &virQEMUDriverPrivateDataCallbacks,
6d3351
                                  &virQEMUDriverDomainXMLNamespace,
6d3351
-                                 &virQEMUDriverDomainABIStability);
6d3351
+                                 &virQEMUDriverDomainABIStability,
6d3351
+                                 NULL);
6d3351
 }
6d3351
 
6d3351
 
6d3351
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
6d3351
index 48201d5b8c..97436e5dc7 100644
6d3351
--- a/src/security/virt-aa-helper.c
6d3351
+++ b/src/security/virt-aa-helper.c
6d3351
@@ -667,7 +667,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
6d3351
         goto exit;
6d3351
     }
6d3351
 
6d3351
-    if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL))) {
6d3351
+    if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL))) {
6d3351
         vah_error(ctl, 0, _("Failed to create XML config object"));
6d3351
         goto exit;
6d3351
     }
6d3351
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
6d3351
index c8085dd797..4fd14ddee6 100644
6d3351
--- a/src/test/test_driver.c
6d3351
+++ b/src/test/test_driver.c
6d3351
@@ -414,7 +414,7 @@ testDriverNew(void)
6d3351
         goto error;
6d3351
     }
6d3351
 
6d3351
-    if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL)) ||
6d3351
+    if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL, NULL)) ||
6d3351
         !(ret->eventState = virObjectEventStateNew()) ||
6d3351
         !(ret->domains = virDomainObjListNew()) ||
6d3351
         !(ret->networks = virNetworkObjListNew()))
6d3351
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
6d3351
index ae75daa596..f91ee2961e 100644
6d3351
--- a/src/uml/uml_driver.c
6d3351
+++ b/src/uml/uml_driver.c
6d3351
@@ -533,7 +533,7 @@ umlStateInitialize(bool privileged,
6d3351
         goto out_of_memory;
6d3351
 
6d3351
     if (!(uml_driver->xmlopt = virDomainXMLOptionNew(&umlDriverDomainDefParserConfig,
6d3351
-                                                     &privcb, NULL, NULL)))
6d3351
+                                                     &privcb, NULL, NULL, NULL)))
6d3351
         goto error;
6d3351
 
6d3351
     if ((uml_driver->inotifyFD = inotify_init()) < 0) {
6d3351
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
6d3351
index c739031660..4a79c43a1a 100644
6d3351
--- a/src/vbox/vbox_common.c
6d3351
+++ b/src/vbox/vbox_common.c
6d3351
@@ -139,7 +139,7 @@ vboxDriverObjNew(void)
6d3351
 
6d3351
     if (!(driver->caps = vboxCapsInit()) ||
6d3351
         !(driver->xmlopt = virDomainXMLOptionNew(&vboxDomainDefParserConfig,
6d3351
-                                                 NULL, NULL, NULL)))
6d3351
+                                                 NULL, NULL, NULL, NULL)))
6d3351
         goto cleanup;
6d3351
 
6d3351
     return driver;
6d3351
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
6d3351
index 24e97a4969..525c85edc8 100644
6d3351
--- a/src/vmware/vmware_driver.c
6d3351
+++ b/src/vmware/vmware_driver.c
6d3351
@@ -114,7 +114,8 @@ vmwareDomainXMLConfigInit(void)
6d3351
     virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
6d3351
                                               .free = vmwareDataFreeFunc };
6d3351
 
6d3351
-    return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv, NULL, NULL);
6d3351
+    return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv,
6d3351
+                                 NULL, NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 static virDrvOpenStatus
6d3351
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
6d3351
index 3289a20026..96507f10f3 100644
6d3351
--- a/src/vmx/vmx.c
6d3351
+++ b/src/vmx/vmx.c
6d3351
@@ -591,7 +591,7 @@ virDomainXMLOptionPtr
6d3351
 virVMXDomainXMLConfInit(void)
6d3351
 {
6d3351
     return virDomainXMLOptionNew(&virVMXDomainDefParserConfig, NULL,
6d3351
-                                 &virVMXDomainXMLNamespace, NULL);
6d3351
+                                 &virVMXDomainXMLNamespace, NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 char *
6d3351
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
6d3351
index f0b6722a6e..532a6841f3 100644
6d3351
--- a/src/vz/vz_driver.c
6d3351
+++ b/src/vz/vz_driver.c
6d3351
@@ -326,7 +326,7 @@ vzDriverObjNew(void)
6d3351
     if (!(driver->caps = vzBuildCapabilities()) ||
6d3351
         !(driver->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig,
6d3351
                                                  &vzDomainXMLPrivateDataCallbacksPtr,
6d3351
-                                                 NULL, NULL)) ||
6d3351
+                                                 NULL, NULL, NULL)) ||
6d3351
         !(driver->domains = virDomainObjListNew()) ||
6d3351
         !(driver->domainEventState = virObjectEventStateNew()) ||
6d3351
         (vzInitVersion(driver) < 0) ||
6d3351
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
6d3351
index 0c160f8370..ab74ba9928 100644
6d3351
--- a/src/xen/xen_driver.c
6d3351
+++ b/src/xen/xen_driver.c
6d3351
@@ -401,7 +401,7 @@ virDomainXMLOptionPtr
6d3351
 xenDomainXMLConfInit(void)
6d3351
 {
6d3351
     return virDomainXMLOptionNew(&xenDomainDefParserConfig,
6d3351
-                                 NULL, NULL, NULL);
6d3351
+                                 NULL, NULL, NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 
6d3351
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
6d3351
index 5623ddb507..c94fd422f9 100644
6d3351
--- a/src/xenapi/xenapi_driver.c
6d3351
+++ b/src/xenapi/xenapi_driver.c
6d3351
@@ -200,7 +200,7 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
6d3351
     }
6d3351
 
6d3351
     if (!(privP->xmlopt = virDomainXMLOptionNew(&xenapiDomainDefParserConfig,
6d3351
-                                                NULL, NULL, NULL))) {
6d3351
+                                                NULL, NULL, NULL, NULL))) {
6d3351
         xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
6d3351
                                   _("Failed to create XML conf object"));
6d3351
         goto error;
6d3351
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
6d3351
index 5d7261a45b..43ef76a594 100644
6d3351
--- a/tests/bhyveargv2xmltest.c
6d3351
+++ b/tests/bhyveargv2xmltest.c
6d3351
@@ -131,7 +131,7 @@ mymain(void)
6d3351
         return EXIT_FAILURE;
6d3351
 
6d3351
     if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL,
6d3351
-                                               NULL, NULL)) == NULL)
6d3351
+                                               NULL, NULL, NULL)) == NULL)
6d3351
         return EXIT_FAILURE;
6d3351
 
6d3351
 # define DO_TEST_FULL(name, flags)                            \
6d3351
diff --git a/tests/testutils.c b/tests/testutils.c
6d3351
index b7dc8d8408..0823469068 100644
6d3351
--- a/tests/testutils.c
6d3351
+++ b/tests/testutils.c
6d3351
@@ -1136,7 +1136,7 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
6d3351
 {
6d3351
     return virDomainXMLOptionNew(&virTestGenericDomainDefParserConfig,
6d3351
                                  &virTestGenericPrivateDataCallbacks,
6d3351
-                                 NULL, NULL);
6d3351
+                                 NULL, NULL, NULL);
6d3351
 }
6d3351
 
6d3351
 
6d3351
-- 
6d3351
2.13.1
6d3351