[libvirt] [PATCH 02/12] conf: Add 'basic' post parse callback

Ján Tomko jtomko at redhat.com
Thu Aug 17 14:37:37 UTC 2017


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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170817/97279c71/attachment-0001.sig>


More information about the libvir-list mailing list