Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/bhyve/bhyve_driver.c | 17 +++---------
src/conf/checkpoint_conf.c | 4 +--
src/conf/domain_conf.c | 29 +++++++-------------
src/conf/domain_conf.h | 6 -----
src/conf/snapshot_conf.c | 6 ++---
src/conf/virdomainobjlist.c | 8 +++---
src/esx/esx_driver.c | 4 +--
src/libxl/libxl_domain.c | 4 +--
src/libxl/libxl_driver.c | 18 ++++++-------
src/libxl/libxl_migration.c | 7 +++--
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 10 +++----
src/openvz/openvz_driver.c | 8 +++---
src/phyp/phyp_driver.c | 4 +--
src/qemu/qemu_checkpoint.c | 4 +--
src/qemu/qemu_domain.c | 7 +----
src/qemu/qemu_driver.c | 46 ++++++++------------------------
src/qemu/qemu_migration.c | 21 +++------------
src/qemu/qemu_migration_cookie.c | 8 +-----
src/security/virt-aa-helper.c | 2 +-
src/test/test_driver.c | 10 +++----
src/vbox/vbox_common.c | 6 ++---
src/vmware/vmware_driver.c | 4 +--
src/vz/vz_driver.c | 4 +--
tests/bhyvexml2argvtest.c | 2 +-
tests/domainconftest.c | 2 +-
tests/libxlxml2domconfigtest.c | 2 +-
tests/qemuagenttest.c | 2 +-
tests/qemuhotplugtest.c | 3 +--
tests/qemumemlocktest.c | 2 +-
tests/qemusecuritytest.c | 1 -
tests/qemuxml2argvtest.c | 2 +-
tests/qemuxml2xmltest.c | 2 +-
tests/securityselinuxlabeltest.c | 2 +-
tests/testutils.c | 5 ++--
tests/xlconfigtest.c | 4 +--
tests/xmconfigtest.c | 2 +-
tests/xml2vmxtest.c | 2 +-
38 files changed, 97 insertions(+), 175 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 8432044b60..0e627f2dc8 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -519,7 +519,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flag
if (!caps)
return NULL;
- if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
+ if ((def = virDomainDefParseString(xml, privconn->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -681,7 +681,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
bhyveConnPtr privconn = conn->privateData;
virDomainDefPtr def = NULL;
virCommandPtr cmd = NULL, loadcmd = NULL;
- virCapsPtr caps = NULL;
char *ret = NULL;
virCheckFlags(0, NULL);
@@ -695,10 +694,7 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
goto cleanup;
}
- if (!(caps = bhyveDriverGetCapabilities(privconn)))
- goto cleanup;
-
- if (!(def = virDomainDefParseString(xmlData, caps, privconn->xmlopt,
+ if (!(def = virDomainDefParseString(xmlData, privconn->xmlopt,
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
@@ -741,7 +737,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn,
virCommandFree(loadcmd);
virCommandFree(cmd);
virDomainDefFree(def);
- virObjectUnref(caps);
return ret;
}
@@ -898,7 +893,6 @@ bhyveDomainCreateXML(virConnectPtr conn,
virDomainDefPtr def = NULL;
virDomainObjPtr vm = NULL;
virObjectEventPtr event = NULL;
- virCapsPtr caps = NULL;
unsigned int start_flags = 0;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
@@ -910,11 +904,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
if (flags & VIR_DOMAIN_START_AUTODESTROY)
start_flags |= VIR_BHYVE_PROCESS_START_AUTODESTROY;
- caps = bhyveDriverGetCapabilities(privconn);
- if (!caps)
- return NULL;
-
- if ((def = virDomainDefParseString(xml, caps, privconn->xmlopt,
+ if ((def = virDomainDefParseString(xml, privconn->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -947,7 +937,6 @@ bhyveDomainCreateXML(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid,
vm->def->id);
cleanup:
- virObjectUnref(caps);
virDomainDefFree(def);
virDomainObjEndAPI(&vm);
virObjectEventStateQueue(privconn->domainEventState, event);
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 37cc8e5e6c..581e382b6d 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -121,7 +121,7 @@ virDomainCheckpointDiskDefParseXML(xmlNodePtr node,
*/
static virDomainCheckpointDefPtr
virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
@@ -170,7 +170,7 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
return NULL;
}
def->parent.dom = virDomainDefParseNode(ctxt->node->doc,
domainNode,
- caps, xmlopt, parseOpaque,
+ xmlopt, parseOpaque,
domainflags);
if (!def->parent.dom)
return NULL;
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b1384a1487..00b5da8d52 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -16371,7 +16371,6 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
virDomainDeviceDefPtr
virDomainDeviceDefParse(const char *xmlStr,
const virDomainDef *def,
- virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
@@ -19725,7 +19724,6 @@ virDomainMemorytuneDefParse(virDomainDefPtr def,
static virDomainDefPtr
virDomainDefParseXML(xmlDocPtr xml,
xmlXPathContextPtr ctxt,
- virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
@@ -21430,7 +21428,6 @@ virDomainDefParseXML(xmlDocPtr xml,
static virDomainObjPtr
virDomainObjParseXML(xmlDocPtr xml,
xmlXPathContextPtr ctxt,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
@@ -21457,7 +21454,7 @@ virDomainObjParseXML(xmlDocPtr xml,
oldnode = ctxt->node;
ctxt->node = config;
- obj->def = virDomainDefParseXML(xml, ctxt, caps, xmlopt, flags);
+ obj->def = virDomainDefParseXML(xml, ctxt, xmlopt, flags);
ctxt->node = oldnode;
if (!obj->def)
goto error;
@@ -21534,7 +21531,6 @@ virDomainObjParseXML(xmlDocPtr xml,
static virDomainDefPtr
virDomainDefParse(const char *xmlStr,
const char *filename,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
@@ -21556,7 +21552,7 @@ virDomainDefParse(const char *xmlStr,
goto cleanup;
}
- def = virDomainDefParseNode(xml, root, caps, xmlopt, parseOpaque, flags);
+ def = virDomainDefParseNode(xml, root, xmlopt, parseOpaque, flags);
cleanup:
xmlFreeDoc(xml);
@@ -21566,29 +21562,26 @@ virDomainDefParse(const char *xmlStr,
virDomainDefPtr
virDomainDefParseString(const char *xmlStr,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
{
- return virDomainDefParse(xmlStr, NULL, caps, xmlopt, parseOpaque, flags);
+ return virDomainDefParse(xmlStr, NULL, xmlopt, parseOpaque, flags);
}
virDomainDefPtr
virDomainDefParseFile(const char *filename,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
{
- return virDomainDefParse(NULL, filename, caps, xmlopt, parseOpaque, flags);
+ return virDomainDefParse(NULL, filename, xmlopt, parseOpaque, flags);
}
virDomainDefPtr
virDomainDefParseNode(xmlDocPtr xml,
xmlNodePtr root,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags)
@@ -21601,7 +21594,7 @@ virDomainDefParseNode(xmlDocPtr xml,
ctxt->node = root;
- if (!(def = virDomainDefParseXML(xml, ctxt, caps, xmlopt, flags)))
+ if (!(def = virDomainDefParseXML(xml, ctxt, xmlopt, flags)))
return NULL;
/* callback to fill driver specific domain aspects */
@@ -21619,7 +21612,6 @@ virDomainDefParseNode(xmlDocPtr xml,
virDomainObjPtr
virDomainObjParseNode(xmlDocPtr xml,
xmlNodePtr root,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
@@ -21637,13 +21629,12 @@ virDomainObjParseNode(xmlDocPtr xml,
return NULL;
ctxt->node = root;
- return virDomainObjParseXML(xml, ctxt, caps, xmlopt, flags);
+ return virDomainObjParseXML(xml, ctxt, xmlopt, flags);
}
virDomainObjPtr
virDomainObjParseFile(const char *filename,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
@@ -21653,7 +21644,7 @@ virDomainObjParseFile(const char *filename,
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjParseNode(xml, xmlDocGetRootElement(xml),
- caps, xmlopt, flags);
+ xmlopt, flags);
xmlFreeDoc(xml);
}
@@ -29330,7 +29321,7 @@ virDomainDefCopy(virDomainDefPtr src,
if (!(xml = virDomainDefFormat(src, xmlopt, format_flags)))
return NULL;
- return virDomainDefParseString(xml, caps, xmlopt, parseOpaque, parse_flags);
+ return virDomainDefParseString(xml, xmlopt, parseOpaque, parse_flags);
}
virDomainDefPtr
@@ -29787,7 +29778,7 @@ virDomainNetFindByName(virDomainDefPtr def,
virDomainDeviceDefPtr
virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
const virDomainDef *def,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque)
{
@@ -29875,7 +29866,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
return NULL;
xmlStr = virBufferContentAndReset(&buf);
- return virDomainDeviceDefParse(xmlStr, def, caps, xmlopt, parseOpaque,
+ return virDomainDeviceDefParse(xmlStr, def, xmlopt, parseOpaque,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4f3c9fdc8b..5255c8190e 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3032,7 +3032,6 @@ typedef enum {
virDomainDeviceDefPtr virDomainDeviceDefParse(const char *xmlStr,
const virDomainDef *def,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags);
@@ -3040,28 +3039,23 @@ virDomainDiskDefPtr virDomainDiskDefParse(const char *xmlStr,
virDomainXMLOptionPtr xmlopt,
unsigned int flags);
virDomainDefPtr virDomainDefParseString(const char *xmlStr,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags);
virDomainDefPtr virDomainDefParseFile(const char *filename,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags);
virDomainDefPtr virDomainDefParseNode(xmlDocPtr doc,
xmlNodePtr root,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
unsigned int flags);
virDomainObjPtr virDomainObjParseNode(xmlDocPtr xml,
xmlNodePtr root,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags);
virDomainObjPtr virDomainObjParseFile(const char *filename,
- virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
unsigned int flags);
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index 015d54a128..af882c6048 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -222,7 +222,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
*/
static virDomainSnapshotDefPtr
virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
void *parseOpaque,
bool *current,
@@ -301,7 +301,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
goto cleanup;
}
def->parent.dom = virDomainDefParseNode(ctxt->node->doc,
domainNode,
- caps, xmlopt, parseOpaque,
+ xmlopt, parseOpaque,
domainflags);
if (!def->parent.dom)
goto cleanup;
@@ -314,7 +314,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
* parent.dom for config and live XML. */
if ((inactiveDomNode = virXPathNode("./inactiveDomain", ctxt))) {
def->parent.inactiveDom = virDomainDefParseNode(ctxt->node->doc,
inactiveDomNode,
- caps, xmlopt, NULL,
domainflags);
+ xmlopt, NULL, domainflags);
if (!def->parent.inactiveDom)
goto cleanup;
}
diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index 744dd87296..ae18a4544f 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -483,7 +483,7 @@ virDomainObjListRename(virDomainObjListPtr doms,
static virDomainObjPtr
virDomainObjListLoadConfig(virDomainObjListPtr doms,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
const char *configDir,
const char *autostartDir,
@@ -499,7 +499,7 @@ virDomainObjListLoadConfig(virDomainObjListPtr doms,
if ((configFile = virDomainConfigFile(configDir, name)) == NULL)
goto error;
- if (!(def = virDomainDefParseFile(configFile, caps, xmlopt, NULL,
+ if (!(def = virDomainDefParseFile(configFile, xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE |
VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL)))
@@ -536,7 +536,7 @@ static virDomainObjPtr
virDomainObjListLoadStatus(virDomainObjListPtr doms,
const char *statusDir,
const char *name,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt,
virDomainLoadConfigNotify notify,
void *opaque)
@@ -548,7 +548,7 @@ virDomainObjListLoadStatus(virDomainObjListPtr doms,
if ((statusFile = virDomainConfigFile(statusDir, name)) == NULL)
goto error;
- if (!(obj = virDomainObjParseFile(statusFile, caps, xmlopt,
+ if (!(obj = virDomainObjParseFile(statusFile, xmlopt,
VIR_DOMAIN_DEF_PARSE_STATUS |
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 8e3da589c9..9cfdd3bf49 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2744,7 +2744,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char
*nativeFormat,
if (virtualHW_version < 0)
return NULL;
- def = virDomainDefParseString(domainXml, priv->caps, priv->xmlopt,
+ def = virDomainDefParseString(domainXml, priv->xmlopt,
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
@@ -2960,7 +2960,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags)
return NULL;
/* Parse domain XML */
- def = virDomainDefParseString(xml, priv->caps, priv->xmlopt,
+ def = virDomainDefParseString(xml, priv->xmlopt,
NULL, parse_flags);
if (!def)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index f4f1781bae..fea20ba477 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -732,7 +732,7 @@ libxlDomainManagedSavePath(libxlDriverPrivatePtr driver,
virDomainObjPtr vm)
*/
int
libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
- libxlDriverConfigPtr cfg,
+ libxlDriverConfigPtr cfg G_GNUC_UNUSED,
const char *from,
virDomainDefPtr *ret_def,
libxlSavefileHeaderPtr ret_hdr)
@@ -780,7 +780,7 @@ libxlDomainSaveImageOpen(libxlDriverPrivatePtr driver,
goto error;
}
- if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt, NULL,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto error;
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index ed754452f0..abf359ad1b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1042,7 +1042,7 @@ libxlDomainCreateXML(virConnectPtr conn, const char *xml,
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -2730,7 +2730,7 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char *
nativeFormat,
goto cleanup;
if (!(def = virDomainDefParseString(domainXml,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
@@ -2850,7 +2850,7 @@ libxlDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flag
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if (!(def = virDomainDefParseString(xml, cfg->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -4116,7 +4116,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
@@ -4133,7 +4133,7 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
/* If dev exists it was created to modify the domain config. Free it. */
virDomainDeviceDefFree(dev);
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
@@ -4205,7 +4205,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto endjob;
@@ -4223,7 +4223,7 @@ libxlDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
/* If dev exists it was created to modify the domain config. Free it. */
virDomainDeviceDefFree(dev);
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto endjob;
@@ -4293,7 +4293,7 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
@@ -4312,7 +4312,7 @@ libxlDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
/* If dev exists it was created to modify the domain config. Free it. */
virDomainDeviceDefFree(dev);
if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- cfg->caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index f9bd004b2e..d744816510 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -402,7 +402,7 @@ libxlDomainMigrationSrcBegin(virConnectPtr conn,
goto endjob;
if (xmlin) {
- if (!(tmpdef = virDomainDefParseString(xmlin, cfg->caps,
+ if (!(tmpdef = virDomainDefParseString(xmlin,
driver->xmlopt,
NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
@@ -450,7 +450,7 @@ libxlDomainMigrationDstPrepareDef(libxlDriverPrivatePtr driver,
return NULL;
}
- if (!(def = virDomainDefParseString(dom_xml, cfg->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
@@ -477,7 +477,6 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn,
bool *taint_hook)
{
libxlDriverPrivatePtr driver = dconn->privateData;
- libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
if (libxlMigrationEatCookie(cookiein, cookieinlen, mig) < 0)
return -1;
@@ -514,7 +513,7 @@ libxlDomainMigrationPrepareAny(virConnectPtr dconn,
virDomainDefPtr newdef;
VIR_DEBUG("Using hook-filtered domain XML: %s", *xmlout);
- newdef = virDomainDefParseString(*xmlout, cfg->caps,
driver->xmlopt,
+ newdef = virDomainDefParseString(*xmlout, driver->xmlopt,
NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index c869e2e7c4..e572c3f5fd 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -212,7 +212,7 @@ static virLXCControllerPtr virLXCControllerNew(const char *name)
goto error;
if ((ctrl->vm = virDomainObjParseFile(configFile,
- driver->caps, driver->xmlopt,
+ driver->xmlopt,
0)) == NULL)
goto error;
ctrl->def = ctrl->vm->def;
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 4639e603e0..1ef15bfcf8 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -416,7 +416,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned
int flags)
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -1164,7 +1164,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -4699,7 +4699,7 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
goto endjob;
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (dev == NULL)
goto endjob;
@@ -4818,7 +4818,7 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto endjob;
- if (!(dev = virDomainDeviceDefParse(xml, vm->def, caps, driver->xmlopt, NULL,
+ if (!(dev = virDomainDeviceDefParse(xml, vm->def, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
@@ -4882,7 +4882,7 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
goto endjob;
dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- caps, driver->xmlopt, NULL,
+ driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
if (dev == NULL)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 33c28a2721..0c472601d3 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -858,7 +858,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int fla
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
openvzDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
+ if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -948,7 +948,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
openvzDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
+ if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -1909,7 +1909,7 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
if (!(def = virDomainObjGetOneDef(vm, flags)))
goto cleanup;
- dev = virDomainDeviceDefParse(xml, def, driver->caps, driver->xmlopt, NULL,
+ dev = virDomainDeviceDefParse(xml, def, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!dev)
goto cleanup;
@@ -2113,7 +2113,7 @@ openvzDomainMigratePrepare3Params(virConnectPtr dconn,
goto error;
}
- if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index a5cb1b91b3..640d90585a 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1684,7 +1684,7 @@ phypDomainAttachDeviceFlags(virDomainPtr domain,
def->os.type = VIR_DOMAIN_OSTYPE_LINUX;
- dev = virDomainDeviceDefParse(xml, def, phyp_driver->caps, NULL, NULL,
+ dev = virDomainDeviceDefParse(xml, def, NULL, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!dev)
goto cleanup;
@@ -3531,7 +3531,7 @@ phypDomainCreateXML(virConnectPtr conn,
if (flags & VIR_DOMAIN_START_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if (!(def = virDomainDefParseString(xml, phyp_driver->caps,
+ if (!(def = virDomainDefParseString(xml,
phyp_driver->xmlopt,
NULL,
parse_flags)))
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index d5af6b99bf..a601030637 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -239,7 +239,7 @@ qemuCheckpointDiscardAllMetadata(virQEMUDriverPtr driver,
/* Called inside job lock */
static int
qemuCheckpointPrepare(virQEMUDriverPtr driver,
- virCapsPtr caps,
+ virCapsPtr caps G_GNUC_UNUSED,
virDomainObjPtr vm,
virDomainCheckpointDefPtr def)
{
@@ -253,7 +253,7 @@ qemuCheckpointPrepare(virQEMUDriverPtr driver,
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
vm->def, priv->origCPU,
true, true)) ||
- !(def->parent.dom = virDomainDefParseString(xml, caps, driver->xmlopt,
+ !(def->parent.dom = virDomainDefParseString(xml, driver->xmlopt,
priv->qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 926ec80ec8..4c589eec05 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8976,17 +8976,12 @@ qemuDomainDefFromXML(virQEMUDriverPtr driver,
virQEMUCapsPtr qemuCaps,
const char *xml)
{
- virCapsPtr caps;
virDomainDefPtr def;
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- return NULL;
-
- def = virDomainDefParseString(xml, caps, driver->xmlopt, qemuCaps,
+ def = virDomainDefParseString(xml, driver->xmlopt, qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
- virObjectUnref(caps);
return def;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 32eae175ed..00788e7aca 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1748,7 +1748,6 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
virObjectEventPtr event = NULL;
virObjectEventPtr event2 = NULL;
unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD;
- g_autoptr(virCaps) caps = NULL;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
@@ -1765,10 +1764,7 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
virNWFilterReadLockFilterUpdates();
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -3277,13 +3273,9 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
int ret = -1;
virObjectEventPtr event = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
- g_autoptr(virCaps) caps = NULL;
virQEMUSaveDataPtr data = NULL;
qemuDomainSaveCookiePtr cookie = NULL;
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
goto cleanup;
@@ -3326,7 +3318,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver,
if (xmlin) {
virDomainDefPtr def = NULL;
- if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xmlin, driver->xmlopt,
priv->qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE))) {
@@ -6581,12 +6573,8 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
virDomainDefPtr ret = NULL;
virDomainDefPtr newdef_migr = NULL;
virDomainDefPtr newdef = NULL;
- g_autoptr(virCaps) caps = NULL;
-
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
- if (!(newdef = virDomainDefParseString(newxml, caps, driver->xmlopt, NULL,
+ if (!(newdef = virDomainDefParseString(newxml, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
@@ -6659,7 +6647,6 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
virQEMUSaveHeaderPtr header;
virDomainDefPtr def = NULL;
int oflags = open_write ? O_RDWR : O_RDONLY;
- g_autoptr(virCaps) caps = NULL;
size_t xml_len;
size_t cookie_len;
@@ -6673,9 +6660,6 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
oflags |= directFlag;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto error;
-
if ((fd = qemuOpenFile(driver, NULL, path, oflags, NULL)) < 0)
goto error;
if (bypass_cache &&
@@ -6770,7 +6754,7 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
}
/* Create a domain from this XML */
- if (!(def = virDomainDefParseString(data->xml, caps, driver->xmlopt, qemuCaps,
+ if (!(def = virDomainDefParseString(data->xml, driver->xmlopt, qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto error;
@@ -7343,7 +7327,6 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
virCommandPtr cmd = NULL;
char *ret = NULL;
size_t i;
- g_autoptr(virCaps) caps = NULL;
virCheckFlags(0, NULL);
@@ -7356,13 +7339,10 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
goto cleanup;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
if (!(vm = virDomainObjNew(driver->xmlopt)))
goto cleanup;
- if (!(vm->def = virDomainDefParseString(xmlData, caps, driver->xmlopt, NULL,
+ if (!(vm->def = virDomainDefParseString(xmlData, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE)))
goto cleanup;
@@ -7587,7 +7567,6 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
virDomainPtr dom = NULL;
virObjectEventPtr event = NULL;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
- g_autoptr(virCaps) caps = NULL;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
@@ -7596,10 +7575,7 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
- if (!(def = virDomainDefParseString(xml, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)))
goto cleanup;
@@ -8641,7 +8617,7 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
if (!vmdef)
goto cleanup;
- if (!(devConf = virDomainDeviceDefParse(xml, vmdef, caps,
+ if (!(devConf = virDomainDeviceDefParse(xml, vmdef,
driver->xmlopt, priv->qemuCaps,
parse_flags)))
goto cleanup;
@@ -8662,7 +8638,7 @@ qemuDomainAttachDeviceLiveAndConfig(virDomainObjPtr vm,
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
- if (!(devLive = virDomainDeviceDefParse(xml, vm->def, caps,
+ if (!(devLive = virDomainDeviceDefParse(xml, vm->def,
driver->xmlopt, priv->qemuCaps,
parse_flags)))
goto cleanup;
@@ -8793,7 +8769,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
!(flags & VIR_DOMAIN_AFFECT_LIVE))
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
- dev = dev_copy = virDomainDeviceDefParse(xml, vm->def, caps,
+ dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
driver->xmlopt, priv->qemuCaps,
parse_flags);
if (dev == NULL)
@@ -8890,7 +8866,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
!(flags & VIR_DOMAIN_AFFECT_LIVE))
parse_flags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
- dev = dev_copy = virDomainDeviceDefParse(xml, vm->def, caps,
+ dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
driver->xmlopt, priv->qemuCaps,
parse_flags);
if (dev == NULL)
@@ -15930,7 +15906,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
vm->def, priv->origCPU,
true, true)) ||
- !(def->parent.dom = virDomainDefParseString(xml, caps, driver->xmlopt,
+ !(def->parent.dom = virDomainDefParseString(xml, driver->xmlopt,
priv->qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e9470cc62c..9086a3a95a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1945,7 +1945,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
qemuMigrationCookiePtr mig = NULL;
virDomainDefPtr def = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
- virCapsPtr caps = NULL;
unsigned int cookieFlags = QEMU_MIGRATION_COOKIE_LOCKSTATE;
VIR_DEBUG("driver=%p, vm=%p, xmlin=%s, dname=%s,"
@@ -1955,9 +1954,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
cookieout, cookieoutlen, nmigrate_disks,
migrate_disks, flags);
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
/* Only set the phase if we are inside QEMU_ASYNC_JOB_MIGRATION_OUT.
* Otherwise we will start the async job later in the perform phase losing
* change protection.
@@ -2074,7 +2070,7 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
}
if (xmlin) {
- if (!(def = virDomainDefParseString(xmlin, caps, driver->xmlopt,
priv->qemuCaps,
+ if (!(def = virDomainDefParseString(xmlin, driver->xmlopt, priv->qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto cleanup;
@@ -2090,7 +2086,6 @@ qemuMigrationSrcBeginPhase(virQEMUDriverPtr driver,
cleanup:
qemuMigrationCookieFree(mig);
- virObjectUnref(caps);
virDomainDefFree(def);
return rv;
}
@@ -2289,7 +2284,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
char *xmlout = NULL;
unsigned int cookieFlags;
unsigned int startFlags;
- virCapsPtr caps = NULL;
qemuProcessIncomingDefPtr incoming = NULL;
bool taint_hook = false;
bool stopProcess = false;
@@ -2340,9 +2334,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
goto cleanup;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto cleanup;
-
if (!qemuMigrationSrcIsAllowedHostdev(*def))
goto cleanup;
@@ -2371,7 +2362,7 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
virDomainDefPtr newdef;
VIR_DEBUG("Using hook-filtered domain XML: %s", xmlout);
- newdef = virDomainDefParseString(xmlout, caps, driver->xmlopt, NULL,
+ newdef = virDomainDefParseString(xmlout, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
if (!newdef)
@@ -2619,7 +2610,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
virDomainObjEndAPI(&vm);
virObjectEventStateQueue(driver->domainEventState, event);
qemuMigrationCookieFree(mig);
- virObjectUnref(caps);
virNWFilterUnlockFilterUpdates();
virErrorRestore(&origErr);
return ret;
@@ -2857,7 +2847,6 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
const char *dname,
char **origname)
{
- virCapsPtr caps = NULL;
virDomainDefPtr def;
char *name = NULL;
@@ -2867,10 +2856,7 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
return NULL;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- return NULL;
-
- if (!(def = virDomainDefParseString(dom_xml, caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
@@ -2882,7 +2868,6 @@ qemuMigrationAnyPrepareDef(virQEMUDriverPtr driver,
}
cleanup:
- virObjectUnref(caps);
if (def && origname)
*origname = name;
else
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 33b3529f8c..9cfb08951c 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1198,10 +1198,6 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
xmlNodePtr *nodes = NULL;
size_t i;
int n;
- virCapsPtr caps = NULL;
-
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto error;
/* We don't store the uuid, name, hostname, or hostuuid
* values. We just compare them to local data to do some
@@ -1330,7 +1326,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
goto error;
}
mig->persistent = virDomainDefParseNode(doc, nodes[0],
- caps, driver->xmlopt, qemuCaps,
+ driver->xmlopt, qemuCaps,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_ABI_UPDATE_MIGRATION
|
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
@@ -1369,13 +1365,11 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
!(mig->caps = qemuMigrationCookieCapsXMLParse(ctxt)))
goto error;
- virObjectUnref(caps);
return 0;
error:
VIR_FREE(tmp);
VIR_FREE(nodes);
- virObjectUnref(caps);
return -1;
}
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 820db5b911..c93dddb228 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -690,7 +690,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
}
ctl->def = virDomainDefParseString(xmlStr,
- ctl->caps, ctl->xmlopt, NULL,
+ ctl->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_SKIP_SECLABEL |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 630cfa1574..c5c533d369 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -945,7 +945,7 @@ testParseDomains(testDriverPtr privconn,
goto error;
def = virDomainDefParseNode(ctxt->doc, node,
- privconn->caps, privconn->xmlopt, NULL,
+ privconn->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (!def)
goto error;
@@ -1678,7 +1678,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
virObjectLock(privconn);
- if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
+ if ((def = virDomainDefParseString(xml, privconn->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -2294,7 +2294,7 @@ testDomainSaveImageOpen(testDriverPtr driver,
}
xml[len] = '\0';
- if (!(def = virDomainDefParseString(xml, driver->caps, driver->xmlopt, NULL,
+ if (!(def = virDomainDefParseString(xml, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE)))
goto error;
@@ -2437,7 +2437,7 @@ testDomainSaveImageDefineXML(virConnectPtr conn,
goto cleanup;
VIR_FORCE_CLOSE(fd);
- if ((newdef = virDomainDefParseString(dxml, privconn->caps, privconn->xmlopt,
NULL,
+ if ((newdef = virDomainDefParseString(dxml, privconn->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)) == NULL)
goto cleanup;
@@ -3989,7 +3989,7 @@ static virDomainPtr testDomainDefineXMLFlags(virConnectPtr conn,
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if ((def = virDomainDefParseString(xml, privconn->caps, privconn->xmlopt,
+ if ((def = virDomainDefParseString(xml, privconn->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 1feb76c0a5..1703120928 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -1858,7 +1858,7 @@ vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags
if (!data->vboxObj)
return ret;
- if (!(def = virDomainDefParseString(xml, data->caps, data->xmlopt,
+ if (!(def = virDomainDefParseString(xml, data->xmlopt,
NULL, parse_flags)))
return ret;
@@ -4257,7 +4257,7 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
- dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt, NULL,
+ dev = virDomainDeviceDefParse(xml, def, data->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (dev == NULL)
goto cleanup;
@@ -4376,7 +4376,7 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char
*xml)
def->os.type = VIR_DOMAIN_OSTYPE_HVM;
- dev = virDomainDeviceDefParse(xml, def, data->caps, data->xmlopt, NULL,
+ dev = virDomainDeviceDefParse(xml, def, data->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
if (dev == NULL)
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index b30c8847d3..32c81b13a0 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -421,7 +421,7 @@ vmwareDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int fla
ctx.datacenterPath = NULL;
vmwareDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
+ if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -683,7 +683,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
vmwareDriverLock(driver);
- if ((vmdef = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
+ if ((vmdef = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index a76c56334d..0acdcb9760 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -792,7 +792,7 @@ vzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned
int flags)
if (flags & VIR_DOMAIN_DEFINE_VALIDATE)
parse_flags |= VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA;
- if ((def = virDomainDefParseString(xml, driver->caps, driver->xmlopt,
+ if ((def = virDomainDefParseString(xml, driver->xmlopt,
NULL, parse_flags)) == NULL)
goto cleanup;
@@ -2992,7 +2992,7 @@ vzDomainMigratePrepare3Params(virConnectPtr conn,
| VZ_MIGRATION_COOKIE_DOMAIN_NAME) < 0)
goto cleanup;
- if (!(def = virDomainDefParseString(dom_xml, driver->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseString(dom_xml, driver->xmlopt,
NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index f5dbb4e154..3c9c61f024 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -35,7 +35,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
if (!(conn = virGetConnect()))
goto out;
- if (!(vmdef = virDomainDefParseFile(xml, driver.caps, driver.xmlopt,
+ if (!(vmdef = virDomainDefParseFile(xml, driver.xmlopt,
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
if (flags & FLAG_EXPECT_PARSE_ERROR) {
ret = 0;
diff --git a/tests/domainconftest.c b/tests/domainconftest.c
index f48c3ca682..754ef2eb3d 100644
--- a/tests/domainconftest.c
+++ b/tests/domainconftest.c
@@ -49,7 +49,7 @@ static int testGetFilesystem(const void *opaque)
filename = g_strdup_printf("%s/domainconfdata/%s.xml", abs_srcdir,
data->filename);
- if (!(def = virDomainDefParseFile(filename, caps, xmlopt, NULL, 0)))
+ if (!(def = virDomainDefParseFile(filename, xmlopt, NULL, 0)))
goto cleanup;
fsdef = virDomainGetFilesystemForTarget(def,
diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c
index 5c8dcf8503..35f0ce8f7d 100644
--- a/tests/libxlxml2domconfigtest.c
+++ b/tests/libxlxml2domconfigtest.c
@@ -76,7 +76,7 @@ testCompareXMLToDomConfig(const char *xmlfile,
if (!(gports = virPortAllocatorRangeNew("vnc", 5900, 6000)))
goto cleanup;
- if (!(vmdef = virDomainDefParseFile(xmlfile, cfg->caps, driver->xmlopt,
+ if (!(vmdef = virDomainDefParseFile(xmlfile, driver->xmlopt,
NULL, VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c
index 9dbbfb3cfe..d8824b8f09 100644
--- a/tests/qemuagenttest.c
+++ b/tests/qemuagenttest.c
@@ -185,7 +185,7 @@ testQemuAgentGetFSInfoCommon(virDomainXMLOptionPtr xmlopt,
domain_filename = g_strdup_printf("%s/qemuagentdata/fsinfo.xml",
abs_srcdir);
- if (!(ret_def = virDomainDefParseFile(domain_filename, driver.caps, xmlopt,
+ if (!(ret_def = virDomainDefParseFile(domain_filename, xmlopt,
NULL, VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto cleanup;
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index b1e53505be..e80545056d 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -87,7 +87,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
return -1;
if (!((*vm)->def = virDomainDefParseString(domxml,
- driver.caps,
driver.xmlopt,
NULL,
parseFlags)))
@@ -277,7 +276,7 @@ testQemuHotplug(const void *data)
device_parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
if (!(dev = virDomainDeviceDefParse(device_xml, vm->def,
- caps, driver.xmlopt, NULL,
+ driver.xmlopt, NULL,
device_parse_flags)))
goto cleanup;
diff --git a/tests/qemumemlocktest.c b/tests/qemumemlocktest.c
index 55f65dcb6a..986dfb77bd 100644
--- a/tests/qemumemlocktest.c
+++ b/tests/qemumemlocktest.c
@@ -37,7 +37,7 @@ testCompareMemLock(const void *data)
xml = g_strdup_printf("%s/qemumemlockdata/qemumemlock-%s.xml", abs_srcdir,
info->name);
- if (!(def = virDomainDefParseFile(xml, driver.caps, driver.xmlopt, NULL,
+ if (!(def = virDomainDefParseFile(xml, driver.xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE))) {
goto cleanup;
}
diff --git a/tests/qemusecuritytest.c b/tests/qemusecuritytest.c
index 8c0a48bb65..380c3fed8c 100644
--- a/tests/qemusecuritytest.c
+++ b/tests/qemusecuritytest.c
@@ -68,7 +68,6 @@ prepareObjects(virQEMUDriverPtr driver,
return -1;
if (!(vm->def = virDomainDefParseString(domxml,
- driver->caps,
driver->xmlopt,
NULL,
0)))
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6890de101b..fe8fa776be 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -450,7 +450,7 @@ testCompareXMLToArgv(const void *data)
parseFlags |= VIR_DOMAIN_DEF_PARSE_INACTIVE;
if (!(vm->def = virDomainDefParseFile(info->infile,
- driver.caps, driver.xmlopt,
+ driver.xmlopt,
NULL, parseFlags))) {
if (flags & FLAG_EXPECT_PARSE_ERROR)
goto ok;
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index f849869735..e5bbd8dec4 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -58,7 +58,7 @@ testCompareStatusXMLToXMLFiles(const void *opaque)
char *actual = NULL;
int ret = -1;
- if (!(obj = virDomainObjParseFile(data->infile, driver.caps, driver.xmlopt,
+ if (!(obj = virDomainObjParseFile(data->infile, driver.xmlopt,
VIR_DOMAIN_DEF_PARSE_STATUS |
VIR_DOMAIN_DEF_PARSE_ACTUAL_NET |
VIR_DOMAIN_DEF_PARSE_PCI_ORIG_STATES |
diff --git a/tests/securityselinuxlabeltest.c b/tests/securityselinuxlabeltest.c
index cbc7018e27..192f2dc84f 100644
--- a/tests/securityselinuxlabeltest.c
+++ b/tests/securityselinuxlabeltest.c
@@ -175,7 +175,7 @@ testSELinuxLoadDef(const char *testname)
xmlfile = g_strdup_printf("%s/securityselinuxlabeldata/%s.xml",
abs_srcdir,
testname);
- if (!(def = virDomainDefParseFile(xmlfile, driver.caps, driver.xmlopt,
+ if (!(def = virDomainDefParseFile(xmlfile, driver.xmlopt,
NULL, 0)))
goto cleanup;
diff --git a/tests/testutils.c b/tests/testutils.c
index 94a0e9068f..c55450de96 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -1107,7 +1107,8 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
int
-testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr xmlopt,
+testCompareDomXML2XMLFiles(virCapsPtr caps G_GNUC_UNUSED,
+ virDomainXMLOptionPtr xmlopt,
const char *infile, const char *outfile, bool live,
unsigned int parseFlags,
testCompareDomXML2XMLResult expectResult)
@@ -1129,7 +1130,7 @@ testCompareDomXML2XMLFiles(virCapsPtr caps, virDomainXMLOptionPtr
xmlopt,
if (!live)
format_flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;
- if (!(def = virDomainDefParseFile(infile, caps, xmlopt, NULL, parse_flags))) {
+ if (!(def = virDomainDefParseFile(infile, xmlopt, NULL, parse_flags))) {
result = TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE;
goto out;
}
diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c
index cdc2c37ed3..3c0469be85 100644
--- a/tests/xlconfigtest.c
+++ b/tests/xlconfigtest.c
@@ -83,11 +83,11 @@ testCompareParseXML(const char *xlcfg, const char *xml, bool
replaceVars)
if (replaceVars) {
if (!(replacedXML = testReplaceVarsXML(xml)))
goto fail;
- if (!(def = virDomainDefParseString(replacedXML, cfg->caps,
driver->xmlopt,
+ if (!(def = virDomainDefParseString(replacedXML, driver->xmlopt,
NULL, VIR_DOMAIN_XML_INACTIVE)))
goto fail;
} else {
- if (!(def = virDomainDefParseFile(xml, cfg->caps, driver->xmlopt,
+ if (!(def = virDomainDefParseFile(xml, driver->xmlopt,
NULL, VIR_DOMAIN_XML_INACTIVE)))
goto fail;
}
diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c
index f8652e228c..7e324eb5d2 100644
--- a/tests/xmconfigtest.c
+++ b/tests/xmconfigtest.c
@@ -53,7 +53,7 @@ testCompareParseXML(const char *xmcfg, const char *xml)
conn = virGetConnect();
if (!conn) goto fail;
- if (!(def = virDomainDefParseFile(xml, cfg->caps, driver->xmlopt, NULL,
+ if (!(def = virDomainDefParseFile(xml, driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto fail;
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 39781beafd..8f0a2a72a4 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -74,7 +74,7 @@ testCompareFiles(const char *xml, const char *vmx, int
virtualHW_version)
char *formatted = NULL;
virDomainDefPtr def = NULL;
- def = virDomainDefParseFile(xml, caps, xmlopt, NULL,
+ def = virDomainDefParseFile(xml, xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE);
if (def == NULL)
--
2.23.0