--- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 2 ++ src/lxc/lxc_driver.c | 6 ++++-- src/openvz/openvz_driver.c | 4 ++-- src/phyp/phyp_driver.c | 4 ++-- src/qemu/qemu_driver.c | 11 +++++++---- src/uml/uml_driver.c | 4 ++-- src/vbox/vbox_tmpl.c | 8 ++++---- src/xen/xend_internal.c | 6 +++--- src/xen/xm_internal.c | 2 ++ 10 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ad1e2a4..2bafdd2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8370,6 +8370,7 @@ virDomainPMStateParseXML(xmlXPathContextPtr ctxt, virDomainDeviceDefPtr virDomainDeviceDefParse(virCapsPtr caps, + virDomainXMLConfPtr xmlconf, virDomainDefPtr def, const char *xmlStr, unsigned int flags) @@ -16374,6 +16375,7 @@ virDomainNetFind(virDomainDefPtr def, const char *device) */ virDomainDeviceDefPtr virDomainDeviceDefCopy(virCapsPtr caps, + virDomainXMLConfPtr xmlconf, const virDomainDefPtr def, virDomainDeviceDefPtr src) { @@ -16442,7 +16444,7 @@ virDomainDeviceDefCopy(virCapsPtr caps, goto cleanup; xmlStr = virBufferContentAndReset(&buf); - ret = virDomainDeviceDefParse(caps, def, xmlStr, flags); + ret = virDomainDeviceDefParse(caps, xmlconf, def, xmlStr, flags); cleanup: VIR_FREE(xmlStr); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 15d9838..8dbad80 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2020,6 +2020,7 @@ void virDomainRedirdevDefFree(virDomainRedirdevDefPtr def); void virDomainRedirFilterDefFree(virDomainRedirFilterDefPtr def); void virDomainDeviceDefFree(virDomainDeviceDefPtr def); virDomainDeviceDefPtr virDomainDeviceDefCopy(virCapsPtr caps, + virDomainXMLConfPtr xmlconf, const virDomainDefPtr def, virDomainDeviceDefPtr src); int virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info, @@ -2082,6 +2083,7 @@ void virDomainObjListRemove(virDomainObjListPtr doms, virDomainObjPtr dom); virDomainDeviceDefPtr virDomainDeviceDefParse(virCapsPtr caps, + virDomainXMLConfPtr xmlconf, virDomainDefPtr def, const char *xmlStr, unsigned int flags); diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 59bb786..97dd3b4 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4337,7 +4337,8 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml, goto cleanup; } - dev = dev_copy = virDomainDeviceDefParse(driver->caps, vm->def, xml, + dev = dev_copy = virDomainDeviceDefParse(driver->caps, driver->xmlconf, + vm->def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) goto cleanup; @@ -4348,7 +4349,8 @@ lxcDomainModifyDeviceFlags(virDomainPtr dom, const char *xml, * create a deep copy of device as adding * to CONFIG takes one instance. */ - dev_copy = virDomainDeviceDefCopy(driver->caps, vm->def, dev); + dev_copy = virDomainDeviceDefCopy(driver->caps, driver->xmlconf, + vm->def, dev); if (!dev_copy) goto cleanup; } diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index f3c183d..fd8f517 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -2085,8 +2085,8 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, &vmdef) < 0) goto cleanup; - dev = virDomainDeviceDefParse(driver->caps, vmdef, xml, - VIR_DOMAIN_XML_INACTIVE); + dev = virDomainDeviceDefParse(driver->caps, driver->xmlconf, + vmdef, xml, VIR_DOMAIN_XML_INACTIVE); if (!dev) goto cleanup; diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index f5cae48..fb53063 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -1750,8 +1750,8 @@ phypAttachDevice(virDomainPtr domain, const char *xml) goto cleanup; } - dev = virDomainDeviceDefParse(phyp_driver->caps, def, xml, - VIR_DOMAIN_XML_INACTIVE); + dev = virDomainDeviceDefParse(phyp_driver->caps, NULL, + def, xml, VIR_DOMAIN_XML_INACTIVE); if (!dev) { goto cleanup; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4720090..2c46583 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5774,7 +5774,8 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn, tmp = dev->data.disk; dev->data.disk = orig_disk; - if (!(dev_copy = virDomainDeviceDefCopy(caps, vm->def, dev))) { + if (!(dev_copy = virDomainDeviceDefCopy(caps, driver->xmlconf, + vm->def, dev))) { dev->data.disk = tmp; goto end; } @@ -6050,7 +6051,8 @@ qemuDomainChangeDiskMediaLive(virDomainObjPtr vm, tmp = dev->data.disk; dev->data.disk = orig_disk; - if (!(dev_copy = virDomainDeviceDefCopy(caps, vm->def, dev))) { + if (!(dev_copy = virDomainDeviceDefCopy(caps, driver->xmlconf, + vm->def, dev))) { dev->data.disk = tmp; goto end; } @@ -6449,7 +6451,8 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml, goto endjob; } - dev = dev_copy = virDomainDeviceDefParse(caps, vm->def, xml, + dev = dev_copy = virDomainDeviceDefParse(caps, driver->xmlconf, + vm->def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) goto endjob; @@ -6460,7 +6463,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml, * create a deep copy of device as adding * to CONFIG takes one instance. */ - dev_copy = virDomainDeviceDefCopy(caps, vm->def, dev); + dev_copy = virDomainDeviceDefCopy(caps, driver->xmlconf, vm->def, dev); if (!dev_copy) goto endjob; } diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index ab68a68..595410b 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -2079,7 +2079,7 @@ static int umlDomainAttachDevice(virDomainPtr dom, const char *xml) goto cleanup; } - dev = virDomainDeviceDefParse(driver->caps, vm->def, xml, + dev = virDomainDeviceDefParse(driver->caps, driver->xmlconf, vm->def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) @@ -2197,7 +2197,7 @@ static int umlDomainDetachDevice(virDomainPtr dom, const char *xml) { goto cleanup; } - dev = virDomainDeviceDefParse(driver->caps, vm->def, xml, + dev = virDomainDeviceDefParse(driver->caps, driver->xmlconf, vm->def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) goto cleanup; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index aa7466b..7a47067 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -5396,8 +5396,8 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom, goto cleanup; } - dev = virDomainDeviceDefParse(data->caps, def, xml, - VIR_DOMAIN_XML_INACTIVE); + dev = virDomainDeviceDefParse(data->caps, data->xmlconf, + def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) goto cleanup; @@ -5631,8 +5631,8 @@ static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) { goto cleanup; } - dev = virDomainDeviceDefParse(data->caps, def, xml, - VIR_DOMAIN_XML_INACTIVE); + dev = virDomainDeviceDefParse(data->caps, data->xmlconf, + def, xml, VIR_DOMAIN_XML_INACTIVE); if (dev == NULL) goto cleanup; diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index aa2f725..e896036 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@ -2519,7 +2519,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr domain, NULL))) goto cleanup; - if (!(dev = virDomainDeviceDefParse(priv->caps, + if (!(dev = virDomainDeviceDefParse(priv->caps, priv->xmlconf, def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; @@ -2679,7 +2679,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr domain, NULL))) goto cleanup; - if (!(dev = virDomainDeviceDefParse(priv->caps, + if (!(dev = virDomainDeviceDefParse(priv->caps, priv->xmlconf, def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; @@ -2786,7 +2786,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr domain, NULL))) goto cleanup; - if (!(dev = virDomainDeviceDefParse(priv->caps, + if (!(dev = virDomainDeviceDefParse(priv->caps, priv->xmlconf, def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index f6a3593..2a42e0a 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -1311,6 +1311,7 @@ xenXMDomainAttachDeviceFlags(virDomainPtr domain, def = entry->def; if (!(dev = virDomainDeviceDefParse(priv->caps, + priv->xmlconf, entry->def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; @@ -1404,6 +1405,7 @@ xenXMDomainDetachDeviceFlags(virDomainPtr domain, def = entry->def; if (!(dev = virDomainDeviceDefParse(priv->caps, + priv->xmlconf, entry->def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; -- 1.8.1.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list