[libvirt] [PATCH 2/3] conf: create a thin wrapper above virDomainDefPostParse

Ján Tomko posted 3 patches 7 years, 8 months ago
[libvirt] [PATCH 2/3] conf: create a thin wrapper above virDomainDefPostParse
Posted by Ján Tomko 7 years, 8 months ago
Rename the original function to virDomainDefPostParseInternal
to allow adding arguments that will be only used by the internal
version.
---
 src/conf/domain_conf.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0315ec6ff..396ace329 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4856,12 +4856,12 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def,
 }
 
 
-int
-virDomainDefPostParse(virDomainDefPtr def,
-                      virCapsPtr caps,
-                      unsigned int parseFlags,
-                      virDomainXMLOptionPtr xmlopt,
-                      void *parseOpaque)
+static int
+virDomainDefPostParseInternal(virDomainDefPtr def,
+                              virCapsPtr caps,
+                              unsigned int parseFlags,
+                              virDomainXMLOptionPtr xmlopt,
+                              void *parseOpaque)
 {
     int ret = -1;
     bool localParseOpaque = false;
@@ -4944,6 +4944,18 @@ virDomainDefPostParse(virDomainDefPtr def,
 }
 
 
+int
+virDomainDefPostParse(virDomainDefPtr def,
+                      virCapsPtr caps,
+                      unsigned int parseFlags,
+                      virDomainXMLOptionPtr xmlopt,
+                      void *parseOpaque)
+{
+    return virDomainDefPostParseInternal(def, caps, parseFlags, xmlopt,
+                                         parseOpaque);
+}
+
+
 /**
  * virDomainDiskAddressDiskBusCompatibility:
  * @bus: disk bus type
-- 
2.13.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/3] conf: create a thin wrapper above virDomainDefPostParse
Posted by Peter Krempa 7 years, 8 months ago
On Tue, Aug 22, 2017 at 13:50:38 +0200, Ján Tomko wrote:
> Rename the original function to virDomainDefPostParseInternal
> to allow adding arguments that will be only used by the internal
> version.
> ---
>  src/conf/domain_conf.c | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list