This needs a reorder of XML option definitions. It might come in handy
one day.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/conf/domain_conf.c | 2 +-
src/conf/domain_conf.h | 17 +++++++++--------
src/libxl/libxl_domain.c | 3 ++-
src/lxc/lxc_domain.c | 3 ++-
src/qemu/qemu_domain.c | 3 ++-
5 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index fd0450f09b37..8199ac0fe16e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -16514,7 +16514,7 @@ virDomainObjParseXML(xmlDocPtr xml,
VIR_FREE(nodes);
if (xmlopt->privateData.parse &&
- xmlopt->privateData.parse(ctxt, obj) < 0)
+ xmlopt->privateData.parse(ctxt, obj, &xmlopt->config) < 0)
goto error;
return obj;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9762c4f27698..daa475dfcc71 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2391,14 +2391,6 @@ typedef bool (*virDomainObjListACLFilter)(virConnectPtr conn,
typedef struct _virDomainXMLOption virDomainXMLOption;
typedef virDomainXMLOption *virDomainXMLOptionPtr;
-typedef void *(*virDomainXMLPrivateDataAllocFunc)(void);
-typedef void (*virDomainXMLPrivateDataFreeFunc)(void *);
-typedef virObjectPtr (*virDomainXMLPrivateDataNewFunc)(void);
-typedef int (*virDomainXMLPrivateDataFormatFunc)(virBufferPtr,
- virDomainObjPtr);
-typedef int (*virDomainXMLPrivateDataParseFunc)(xmlXPathContextPtr,
- virDomainObjPtr);
-
/* Called once after everything else has been parsed, for adjusting
* overall domain defaults. */
typedef int (*virDomainDefPostParseCallback)(virDomainDefPtr def,
@@ -2427,6 +2419,15 @@ struct _virDomainDefParserConfig {
unsigned char macPrefix[VIR_MAC_PREFIX_BUFLEN];
};
+typedef void *(*virDomainXMLPrivateDataAllocFunc)(void);
+typedef void (*virDomainXMLPrivateDataFreeFunc)(void *);
+typedef virObjectPtr (*virDomainXMLPrivateDataNewFunc)(void);
+typedef int (*virDomainXMLPrivateDataFormatFunc)(virBufferPtr,
+ virDomainObjPtr);
+typedef int (*virDomainXMLPrivateDataParseFunc)(xmlXPathContextPtr,
+ virDomainObjPtr,
+ virDomainDefParserConfigPtr);
+
typedef struct _virDomainXMLPrivateDataCallbacks virDomainXMLPrivateDataCallbacks;
typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr;
struct _virDomainXMLPrivateDataCallbacks {
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 224ff773f938..40dcea171c06 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -224,7 +224,8 @@ libxlDomainObjPrivateFree(void *data)
static int
libxlDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
- virDomainObjPtr vm)
+ virDomainObjPtr vm,
+ virDomainDefParserConfigPtr config ATTRIBUTE_UNUSED)
{
libxlDomainObjPrivatePtr priv = vm->privateData;
diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c
index 70606f376583..2f377d8dcba3 100644
--- a/src/lxc/lxc_domain.c
+++ b/src/lxc/lxc_domain.c
@@ -65,7 +65,8 @@ virLXCDomainObjPrivateXMLFormat(virBufferPtr buf,
static int
virLXCDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
- virDomainObjPtr vm)
+ virDomainObjPtr vm,
+ virDomainDefParserConfigPtr config ATTRIBUTE_UNUSED)
{
virLXCDomainObjPrivatePtr priv = vm->privateData;
unsigned long long thepid;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ad9a8ac1aaec..d4b4a28d0d0b 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -623,7 +623,8 @@ qemuDomainObjPrivateXMLFormat(virBufferPtr buf,
static int
qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
- virDomainObjPtr vm)
+ virDomainObjPtr vm,
+ virDomainDefParserConfigPtr config ATTRIBUTE_UNUSED)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
char *monitorpath;
--
2.5.0