Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/conf/domain_conf.c | 17 ++++++-----------
src/conf/domain_conf.h | 9 ++-------
src/libxl/libxl_domain.c | 6 +++---
src/libxl/libxl_driver.c | 15 ++++++---------
src/libxl/libxl_migration.c | 3 +--
src/lxc/lxc_driver.c | 22 ++++++----------------
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_domain.c | 7 +------
src/qemu/qemu_driver.c | 26 +++++++++++---------------
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_process.c | 2 +-
src/test/test_driver.c | 7 ++-----
tests/qemuhotplugtest.c | 2 +-
13 files changed, 42 insertions(+), 78 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 00b5da8d52..011e104220 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3670,8 +3670,7 @@ virDomainObjWaitUntil(virDomainObjPtr vm,
* @return 0 on success, -1 on failure
*/
int
-virDomainObjSetDefTransient(virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
+virDomainObjSetDefTransient(virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
void *parseOpaque)
{
@@ -3683,7 +3682,7 @@ virDomainObjSetDefTransient(virCapsPtr caps,
if (domain->newDef)
return 0;
- if (!(domain->newDef = virDomainDefCopy(domain->def, caps, xmlopt,
+ if (!(domain->newDef = virDomainDefCopy(domain->def, xmlopt,
parseOpaque, false)))
goto out;
@@ -3721,13 +3720,12 @@ virDomainObjRemoveTransientDef(virDomainObjPtr domain)
* @return NULL on error, virDOmainDefPtr on success
*/
virDomainDefPtr
-virDomainObjGetPersistentDef(virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
+virDomainObjGetPersistentDef(virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
void *parseOpaque)
{
if (virDomainObjIsActive(domain) &&
- virDomainObjSetDefTransient(caps, xmlopt, domain, parseOpaque) < 0)
+ virDomainObjSetDefTransient(xmlopt, domain, parseOpaque) < 0)
return NULL;
if (domain->newDef)
@@ -29304,7 +29302,6 @@ virDomainUSBDeviceDefForeach(virDomainDefPtr def,
* snapshots). */
virDomainDefPtr
virDomainDefCopy(virDomainDefPtr src,
- virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
bool migratable)
@@ -29326,14 +29323,13 @@ virDomainDefCopy(virDomainDefPtr src,
virDomainDefPtr
virDomainObjCopyPersistentDef(virDomainObjPtr dom,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque)
{
virDomainDefPtr cur;
- cur = virDomainObjGetPersistentDef(caps, xmlopt, dom, parseOpaque);
- return virDomainDefCopy(cur, caps, xmlopt, parseOpaque, false);
+ cur = virDomainObjGetPersistentDef(xmlopt, dom, parseOpaque);
+ return virDomainDefCopy(cur, xmlopt, parseOpaque, false);
}
@@ -29778,7 +29774,6 @@ virDomainNetFindByName(virDomainDefPtr def,
virDomainDeviceDefPtr
virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
const virDomainDef *def,
- virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque)
{
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 5255c8190e..1aac01a386 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2895,7 +2895,6 @@ void virDomainShmemDefFree(virDomainShmemDefPtr def);
void virDomainDeviceDefFree(virDomainDeviceDefPtr def);
virDomainDeviceDefPtr virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
const virDomainDef *def,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque);
virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDomainDeviceDefPtr device);
@@ -2936,14 +2935,12 @@ void virDomainObjAssignDef(virDomainObjPtr domain,
virDomainDefPtr def,
bool live,
virDomainDefPtr *oldDef);
-int virDomainObjSetDefTransient(virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
+int virDomainObjSetDefTransient(virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
void *parseOpaque);
void virDomainObjRemoveTransientDef(virDomainObjPtr domain);
virDomainDefPtr
-virDomainObjGetPersistentDef(virCapsPtr caps,
- virDomainXMLOptionPtr xmlopt,
+virDomainObjGetPersistentDef(virDomainXMLOptionPtr xmlopt,
virDomainObjPtr domain,
void *parseOpaque);
@@ -2960,12 +2957,10 @@ virDomainDefPtr virDomainObjGetOneDefState(virDomainObjPtr vm,
virDomainDefPtr virDomainObjGetOneDef(virDomainObjPtr vm, unsigned int flags);
virDomainDefPtr virDomainDefCopy(virDomainDefPtr src,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
bool migratable);
virDomainDefPtr virDomainObjCopyPersistentDef(virDomainObjPtr dom,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque);
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index fea20ba477..0ad511c373 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -1322,7 +1322,7 @@ libxlDomainStart(libxlDriverPrivatePtr driver,
VIR_FREE(managed_save_path);
}
- if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt, vm, NULL) < 0)
+ if (virDomainObjSetDefTransient(driver->xmlopt, vm, NULL) < 0)
goto cleanup;
/* Run an early hook to set-up missing devices */
@@ -1550,8 +1550,8 @@ libxlDomainDefCheckABIStability(libxlDriverPrivatePtr driver,
g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver);
bool ret = false;
- if (!(migratableDefSrc = virDomainDefCopy(src, cfg->caps, driver->xmlopt, NULL,
true)) ||
- !(migratableDefDst = virDomainDefCopy(dst, cfg->caps, driver->xmlopt, NULL,
true)))
+ if (!(migratableDefSrc = virDomainDefCopy(src, driver->xmlopt, NULL, true)) ||
+ !(migratableDefDst = virDomainDefCopy(dst, driver->xmlopt, NULL, true)))
goto cleanup;
ret = virDomainDefCheckABIStability(migratableDefSrc,
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index abf359ad1b..11a08ed68a 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1601,7 +1601,7 @@ libxlDomainGetMaxMemory(virDomainPtr dom)
* domain configuration if needed. Return -1 on error.
*/
static int
-virDomainLiveConfigHelperMethod(virCapsPtr caps,
+virDomainLiveConfigHelperMethod(virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
virDomainObjPtr dom,
unsigned int *flags,
@@ -1611,7 +1611,7 @@ virDomainLiveConfigHelperMethod(virCapsPtr caps,
return -1;
if (*flags & VIR_DOMAIN_AFFECT_CONFIG) {
- if (!(*persistentDef = virDomainObjGetPersistentDef(caps, xmlopt, dom, NULL))) {
+ if (!(*persistentDef = virDomainObjGetPersistentDef(xmlopt, dom, NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Get persistent config failed"));
return -1;
@@ -2298,7 +2298,7 @@ libxlDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
goto endjob;
}
- if (!(def = virDomainObjGetPersistentDef(cfg->caps, driver->xmlopt, vm,
NULL)))
+ if (!(def = virDomainObjGetPersistentDef(driver->xmlopt, vm, NULL)))
goto endjob;
maplen = VIR_CPU_MAPLEN(nvcpus);
@@ -4121,8 +4121,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
goto endjob;
/* Make a copy for updated domain. */
- if (!(vmdef = virDomainObjCopyPersistentDef(vm, cfg->caps,
- driver->xmlopt, NULL)))
+ if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
goto endjob;
if (libxlDomainAttachDeviceConfig(vmdef, dev) < 0)
@@ -4211,8 +4210,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
goto endjob;
/* Make a copy for updated domain. */
- if (!(vmdef = virDomainObjCopyPersistentDef(vm, cfg->caps,
- driver->xmlopt, NULL)))
+ if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
goto endjob;
if (libxlDomainDetachDeviceConfig(vmdef, dev) < 0)
@@ -4298,8 +4296,7 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
goto cleanup;
/* Make a copy for updated domain. */
- if (!(vmdef = virDomainObjCopyPersistentDef(vm, cfg->caps,
- driver->xmlopt, NULL)))
+ if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
goto cleanup;
if ((ret = libxlDomainUpdateDeviceConfig(vmdef, dev)) < 0)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index d744816510..0d10da1811 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -1321,8 +1321,7 @@ libxlDomainMigrationDstFinish(virConnectPtr dconn,
virDomainDefPtr vmdef;
vm->persistent = 1;
- if (!(vmdef = virDomainObjGetPersistentDef(cfg->caps,
- driver->xmlopt, vm, NULL)))
+ if (!(vmdef = virDomainObjGetPersistentDef(driver->xmlopt, vm, NULL)))
goto cleanup;
if (virDomainDefSave(vmdef, driver->xmlopt, cfg->caps, cfg->configDir)
< 0)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 1ef15bfcf8..55945bafcd 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1907,7 +1907,7 @@ lxcDomainSetSchedulerParametersFlags(virDomainPtr dom,
if (persistentDef) {
/* Make a copy for updated domain. */
- persistentDefCopy = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt,
NULL);
+ persistentDefCopy = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL);
if (!persistentDefCopy)
goto endjob;
}
@@ -4673,7 +4673,6 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
- virCapsPtr caps = NULL;
virDomainObjPtr vm = NULL;
virDomainDefPtr vmdef = NULL;
virDomainDeviceDefPtr dev = NULL, dev_copy = NULL;
@@ -4692,9 +4691,6 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
if (virLXCDomainObjBeginJob(driver, vm, LXC_JOB_MODIFY) < 0)
goto cleanup;
- if (!(caps = virLXCDriverGetCapabilities(driver, false)))
- goto endjob;
-
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
goto endjob;
@@ -4711,14 +4707,14 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
* to CONFIG takes one instance.
*/
dev_copy = virDomainDeviceDefCopy(dev, vm->def,
- caps, driver->xmlopt, NULL);
+ driver->xmlopt, NULL);
if (!dev_copy)
goto endjob;
}
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt, NULL);
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL);
if (!vmdef)
goto endjob;
@@ -4768,7 +4764,6 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
virDomainDeviceDefFree(dev_copy);
virDomainDeviceDefFree(dev);
virDomainObjEndAPI(&vm);
- virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
}
@@ -4787,7 +4782,6 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
unsigned int flags)
{
virLXCDriverPtr driver = dom->conn->privateData;
- virCapsPtr caps = NULL;
virDomainObjPtr vm = NULL;
virDomainDefPtr vmdef = NULL;
virDomainDeviceDefPtr dev = NULL;
@@ -4815,15 +4809,12 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
goto endjob;
}
- if (!(caps = virLXCDriverGetCapabilities(driver, false)))
- goto endjob;
-
if (!(dev = virDomainDeviceDefParse(xml, vm->def, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
/* Make a copy for updated domain. */
- if (!(vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt, NULL)))
+ if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
goto endjob;
/* virDomainDefCompatibleDevice call is delayed until we know the
@@ -4845,7 +4836,6 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
virDomainDefFree(vmdef);
virDomainDeviceDefFree(dev);
virDomainObjEndAPI(&vm);
- virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
}
@@ -4895,14 +4885,14 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
* to CONFIG takes one instance.
*/
dev_copy = virDomainDeviceDefCopy(dev, vm->def,
- caps, driver->xmlopt, NULL);
+ driver->xmlopt, NULL);
if (!dev_copy)
goto endjob;
}
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt, NULL);
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL);
if (!vmdef)
goto endjob;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index cd8ee4975b..e648d490c8 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1266,7 +1266,7 @@ int virLXCProcessStart(virConnectPtr conn,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, NULL) < 0)
+ if (virDomainObjSetDefTransient(driver->xmlopt, vm, NULL) < 0)
goto cleanup;
/* Run an early hook to set-up missing devices */
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 4c589eec05..3abd37e25d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9035,17 +9035,13 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver,
{
int ret = -1;
virDomainDefPtr copy = NULL;
- virCapsPtr caps = NULL;
virCheckFlags(VIR_DOMAIN_XML_COMMON_FLAGS | VIR_DOMAIN_XML_UPDATE_CPU, -1);
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
if (!(flags & (VIR_DOMAIN_XML_UPDATE_CPU | VIR_DOMAIN_XML_MIGRATABLE)))
goto format;
- if (!(copy = virDomainDefCopy(def, caps, driver->xmlopt, qemuCaps,
+ if (!(copy = virDomainDefCopy(def, driver->xmlopt, qemuCaps,
flags & VIR_DOMAIN_XML_MIGRATABLE)))
goto cleanup;
@@ -9219,7 +9215,6 @@ qemuDomainDefFormatBufInternal(virQEMUDriverPtr driver,
cleanup:
virDomainDefFree(copy);
- virObjectUnref(caps);
return ret;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 00788e7aca..a3b470d7b8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8612,7 +8612,7 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
* rely on the correct vm->def or vm->newDef being passed, so call the
* device parse based on which definition is in use */
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt,
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt,
priv->qemuCaps);
if (!vmdef)
goto cleanup;
@@ -8781,7 +8781,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
* create a deep copy of device as adding
* to CONFIG takes one instance.
*/
- dev_copy = virDomainDeviceDefCopy(dev, vm->def, caps,
+ dev_copy = virDomainDeviceDefCopy(dev, vm->def,
driver->xmlopt, priv->qemuCaps);
if (!dev_copy)
goto endjob;
@@ -8789,7 +8789,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt,
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt,
priv->qemuCaps);
if (!vmdef)
goto endjob;
@@ -8878,7 +8878,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
* create a deep copy of device as adding
* to CONFIG takes one instance.
*/
- dev_copy = virDomainDeviceDefCopy(dev, vm->def, caps,
+ dev_copy = virDomainDeviceDefCopy(dev, vm->def,
driver->xmlopt, priv->qemuCaps);
if (!dev_copy)
goto cleanup;
@@ -8886,7 +8886,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
- vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt,
priv->qemuCaps);
+ vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, priv->qemuCaps);
if (!vmdef)
goto cleanup;
@@ -8967,7 +8967,7 @@ qemuDomainDetachDeviceAliasLiveAndConfig(virQEMUDriverPtr driver,
if (persistentDef) {
virDomainDeviceDef dev;
- if (!(vmdef = virDomainObjCopyPersistentDef(vm, caps, driver->xmlopt,
+ if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt,
priv->qemuCaps)))
goto cleanup;
@@ -10570,7 +10570,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
if (persistentDef) {
/* Make a copy for updated domain. */
- if (!(persistentDefCopy = virDomainObjCopyPersistentDef(vm, caps,
+ if (!(persistentDefCopy = virDomainObjCopyPersistentDef(vm,
driver->xmlopt,
priv->qemuCaps)))
goto endjob;
@@ -15913,7 +15913,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
goto endjob;
if (vm->newDef) {
- def->parent.inactiveDom = virDomainDefCopy(vm->newDef, caps,
+ def->parent.inactiveDom = virDomainDefCopy(vm->newDef,
driver->xmlopt,
priv->qemuCaps, true);
if (!def->parent.inactiveDom)
goto endjob;
@@ -16441,7 +16441,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
virDomainDefPtr config = NULL;
virDomainDefPtr inactiveConfig = NULL;
g_autoptr(virQEMUDriverConfig) cfg = NULL;
- g_autoptr(virCaps) caps = NULL;
bool was_stopped = false;
qemuDomainSaveCookiePtr cookie;
virCPUDefPtr origCPU = NULL;
@@ -16478,9 +16477,6 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
if (virDomainRevertToSnapshotEnsureACL(snapshot->domain->conn, vm->def) <
0)
goto cleanup;
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
if (qemuDomainHasBlockjob(vm, false)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain has active block job"));
@@ -16532,14 +16528,14 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
}
if (snap->def->dom) {
- config = virDomainDefCopy(snap->def->dom, caps,
+ config = virDomainDefCopy(snap->def->dom,
driver->xmlopt, priv->qemuCaps, true);
if (!config)
goto endjob;
}
if (snap->def->inactiveDom) {
- inactiveConfig = virDomainDefCopy(snap->def->inactiveDom, caps,
+ inactiveConfig = virDomainDefCopy(snap->def->inactiveDom,
driver->xmlopt, priv->qemuCaps, true);
if (!inactiveConfig)
goto endjob;
@@ -16552,7 +16548,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
*/
if (snapdef->state == VIR_DOMAIN_SNAPSHOT_RUNNING ||
snapdef->state == VIR_DOMAIN_SNAPSHOT_PAUSED) {
- inactiveConfig = virDomainDefCopy(snap->def->dom, caps,
+ inactiveConfig = virDomainDefCopy(snap->def->dom,
driver->xmlopt, priv->qemuCaps,
true);
if (!inactiveConfig)
goto endjob;
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 9086a3a95a..1a6c179999 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4823,7 +4823,7 @@ qemuMigrationDstPersist(virQEMUDriverPtr driver,
oldDef = vm->newDef;
vm->newDef = qemuMigrationCookieGetPersistent(mig);
- if (!(vmdef = virDomainObjGetPersistentDef(caps, driver->xmlopt, vm,
+ if (!(vmdef = virDomainObjGetPersistentDef(driver->xmlopt, vm,
priv->qemuCaps)))
goto error;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 33ebdce01e..0302d0489b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5600,7 +5600,7 @@ qemuProcessInit(virQEMUDriverPtr driver,
* report implicit runtime defaults in the XML, like vnc listen/socket
*/
VIR_DEBUG("Setting current domain def as transient");
- if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, priv->qemuCaps) <
0)
+ if (virDomainObjSetDefTransient(driver->xmlopt, vm, priv->qemuCaps) < 0)
goto cleanup;
if (flags & VIR_QEMU_PROCESS_START_PRETEND) {
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index c5c533d369..02f6175e2f 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -696,8 +696,7 @@ testDomainStartState(testDriverPtr privconn,
virDomainObjSetState(dom, VIR_DOMAIN_RUNNING, reason);
dom->def->id = virAtomicIntAdd(&privconn->nextDomID, 1);
- if (virDomainObjSetDefTransient(privconn->caps,
- privconn->xmlopt,
+ if (virDomainObjSetDefTransient(privconn->xmlopt,
dom, NULL) < 0) {
goto cleanup;
}
@@ -8571,7 +8570,6 @@ testDomainSnapshotCreateXML(virDomainPtr domain,
goto cleanup;
} else {
if (!(def->parent.dom = virDomainDefCopy(vm->def,
- privconn->caps,
privconn->xmlopt,
NULL,
true)))
@@ -8794,7 +8792,7 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
virDomainSnapshotSetCurrent(vm->snapshots, NULL);
- config = virDomainDefCopy(snap->def->dom, privconn->caps,
+ config = virDomainDefCopy(snap->def->dom,
privconn->xmlopt, NULL, true);
if (!config)
goto cleanup;
@@ -9027,7 +9025,6 @@ testDomainCheckpointCreateXML(virDomainPtr domain,
goto cleanup;
} else {
if (!(def->parent.dom = virDomainDefCopy(vm->def,
- privconn->caps,
privconn->xmlopt,
NULL,
true)))
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index e80545056d..8e7273b673 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -427,7 +427,7 @@ testQemuHotplugCpuPrepare(const char *test,
/* create vm->newDef */
data->vm->persistent = true;
- if (virDomainObjSetDefTransient(caps, driver.xmlopt, data->vm, NULL) < 0)
+ if (virDomainObjSetDefTransient(driver.xmlopt, data->vm, NULL) < 0)
goto error;
priv = data->vm->privateData;
--
2.23.0