On Wed, Aug 16, 2017 at 04:57:51PM +0200, Peter Krempa wrote:
Add yet another post parse callback, which is executed prior the real
one without @parseOpaque. This is meant to set basics before
@parseOpaque (in case of the qemu driver qemuCaps) can be allocated.
This callback will allow to optimize passing of custom parseOpaque
through the callbacks.
---
src/conf/domain_conf.c | 9 +++++++++
src/conf/domain_conf.h | 10 ++++++++++
2 files changed, 19 insertions(+)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index f857f509e..4daf024ea 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2497,6 +2497,15 @@ typedef enum {
typedef struct _virDomainXMLOption virDomainXMLOption;
typedef virDomainXMLOption *virDomainXMLOptionPtr;
+
+/* Called after everything else has been parsed, for adjusting basics.
+ * This has similar semantics to virDomainDefPostParseCallback, but no
+ * parseOpaque is used used. This callback is run prior to
s/used //
Jan
+ * virDomainDefPostParseCallback. */
+typedef int (*virDomainDefPostParseBasicCallback)(virDomainDefPtr def,
+ virCapsPtr caps,
+ void *opaque);
+
/* Called once after everything else has been parsed, for adjusting
* overall domain defaults.
* @parseOpaque is opaque data passed by virDomainDefParse* caller,